From 6465c820da7b104150366a8cdd837c00cf364235 Mon Sep 17 00:00:00 2001 From: Kieran Kunhya Date: Mon, 23 May 2011 03:02:12 +0100 Subject: [PATCH 1/7] Fix 9/10 bit in swscale. Signed-off-by: Ronald S. Bultje --- libswscale/swscale.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f5c4e88688..3943aa0b72 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -233,7 +233,7 @@ static av_always_inline void yuv2yuvX16inC_template(const int16_t *lumFilter, co } \ } for (i = 0; i < dstW; i++) { - int val = 1 << 10; + int val = 1 << (26-output_bits); int j; for (j = 0; j < lumFilterSize; j++) @@ -244,8 +244,8 @@ static av_always_inline void yuv2yuvX16inC_template(const int16_t *lumFilter, co if (uDest) { for (i = 0; i < chrDstW; i++) { - int u = 1 << 10; - int v = 1 << 10; + int u = 1 << (26-output_bits); + int v = 1 << (26-output_bits); int j; for (j = 0; j < chrFilterSize; j++) { @@ -260,7 +260,7 @@ static av_always_inline void yuv2yuvX16inC_template(const int16_t *lumFilter, co if (CONFIG_SWSCALE_ALPHA && aDest) { for (i = 0; i < dstW; i++) { - int val = 1 << 10; + int val = 1 << (26-output_bits); int j; for (j = 0; j < lumFilterSize; j++) From a10fb79070c017be613700b946f51baed4f69df0 Mon Sep 17 00:00:00 2001 From: Dave Yeo Date: Sun, 22 May 2011 10:44:17 -0700 Subject: [PATCH 2/7] x86 asm: Add SECTION_TEXT to dct32_sse.asm. This fixes the following error on OS/2: error: segment name `.text align=16' not recognized Signed-off-by: Diego Biurrun --- libavcodec/x86/dct32_sse.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/dct32_sse.asm b/libavcodec/x86/dct32_sse.asm index bafe00289d..46daa43d8c 100644 --- a/libavcodec/x86/dct32_sse.asm +++ b/libavcodec/x86/dct32_sse.asm @@ -203,7 +203,7 @@ ps_p1p1m1m1: dd 0, 0, 0x80000000, 0x80000000, 0, 0, 0x80000000, 0x80000000 %define BUTTERFLY0 BUTTERFLY0_AVX INIT_YMM -section .text align=16 +SECTION_TEXT %ifdef HAVE_AVX ; void ff_dct32_float_avx(FFTSample *out, const FFTSample *in) cglobal dct32_float_avx, 2,3,8, out, in, tmp From b47904d158709bdec1a9d40e83d1abadf50081dc Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 20 May 2011 00:39:12 +0300 Subject: [PATCH 3/7] h264: Properly set coded_{width, height} when parsing H.264. Signed-off-by: Felipe Contreras Signed-off-by: Diego Biurrun --- libavcodec/h264.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 5fb303c82f..eb873a4855 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1914,6 +1914,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ s->avctx->sample_aspect_ratio= h->sps.sar; av_assert0(s->avctx->sample_aspect_ratio.den); + h->s.avctx->coded_width = 16*s->mb_width; + h->s.avctx->coded_height = 16*s->mb_height; + if(h->sps.video_signal_type_present_flag){ s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; if(h->sps.colour_description_present_flag){ From 845807494b013a5429918f5d3252c343abcee315 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 23 May 2011 08:08:03 -0400 Subject: [PATCH 4/7] fate: update 9/10bit refs. --- tests/ref/lavfi/pixfmts_scale_le | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ref/lavfi/pixfmts_scale_le b/tests/ref/lavfi/pixfmts_scale_le index cbccb41cbd..37dce4f86c 100644 --- a/tests/ref/lavfi/pixfmts_scale_le +++ b/tests/ref/lavfi/pixfmts_scale_le @@ -27,12 +27,12 @@ uyvy422 314bd486277111a95d9369b944fa0400 yuv410p 7df8f6d69b56a8dcb6c7ee908e5018b5 yuv411p 1143e7c5cc28fe0922b051b17733bc4c yuv420p fdad2d8df8985e3d17e73c71f713cb14 -yuv420p10be 5051128ca208d89595f7672b1707340b -yuv420p10le 77895bf65e70ad2ca021702fff55c8fc +yuv420p10be 6d335e75b553da590135cf8bb999610c +yuv420p10le d510ddbabefd03ef39ec943fcb51b709 yuv420p16be 29a0265764530070f5cd3251cc01f66a yuv420p16le 6f3a265b084a78baec229238d9f7945f -yuv420p9be 02de6b37dc8a631ce2367b535670c40c -yuv420p9le cddfbaf8e2a61aa5ea09fb396bcbc872 +yuv420p9be ec4983b7a949c0472110a7a2c58e278a +yuv420p9le c136dce5913a722eee44ab72cff664b2 yuv422p 918e37701ee7377d16a8a6c119c56a40 yuv422p16be ef3e865fc1d0c68977c735323c50af6e yuv422p16le 428a9b96214c09cb5a983ce36d6961ff From b51021da7b69a98f135cf15bbe7f3ecb08daaa82 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 23 May 2011 08:44:31 -0400 Subject: [PATCH 5/7] fate: fix fate-h264-conformance-frext-pph10i4-panasonic-a crcs. The sample on rsync was corrupt, this one is now bitexact w.r.t. JM. --- .../h264-conformance-frext-pph10i4_panasonic_a | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a b/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a index d351a7eb1f..a06c4577ff 100644 --- a/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a +++ b/tests/ref/fate/h264-conformance-frext-pph10i4_panasonic_a @@ -4,16 +4,7 @@ 0, 10800, 6220800, 0x7459a1cc 0, 14400, 6220800, 0x02191aa9 0, 18000, 6220800, 0x88dca590 -0, 21600, 6220800, 0x56dd150a -0, 25200, 6220800, 0x5f56a56f -0, 28800, 6220800, 0x67ada4b7 -0, 32400, 6220800, 0x88dca590 -0, 36000, 6220800, 0xd3b09fe5 -0, 39600, 6220800, 0x2223998c -0, 43200, 6220800, 0x5e5b2da5 -0, 46800, 6220800, 0x88dca590 -0, 50400, 6220800, 0x5e5b2da5 -0, 54000, 6220800, 0x88dca590 -0, 57600, 6220800, 0x5e5b2da5 -0, 61200, 6220800, 0x88dca590 -0, 64800, 6220800, 0x26e1ec8b +0, 21600, 6220800, 0x4484d484 +0, 25200, 6220800, 0x8afdb53f +0, 28800, 6220800, 0xd3d6017a +0, 32400, 6220800, 0xf5162af0 From cef7d70181ec7ee9df426ef0f3a08dd4995a4d9a Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 23 May 2011 15:56:52 -0400 Subject: [PATCH 6/7] aacdec: fix typo in scalefactor clipping check --- libavcodec/aacdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index fbb3582661..69aacb86d6 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -820,7 +820,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, else offset[1] += get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60; clipped_offset = av_clip(offset[1], -100, 155); - if (offset[2] != clipped_offset) { + if (offset[1] != clipped_offset) { av_log_ask_for_sample(ac->avctx, "Noise gain clipped " "(%d -> %d).\nIf you heard an audible " "artifact, there may be a bug in the decoder. ", From a7a187a1beb8551101b592bf85f0f31a0db22f61 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 15 May 2011 14:32:15 +0200 Subject: [PATCH 7/7] configure: Add -U__STRICT_ANSI__ to CPPFLAGS on Cygwin and DOS. In -std=c99 mode GCC defines __STRICT_ANSI__ to hide non-ANSI interfaces. This causes declarations for some POSIX functions to be omitted from system headers, which causes compilation failures. --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index b63330cbff..5e3d6fbe47 100755 --- a/configure +++ b/configure @@ -2458,11 +2458,13 @@ case $target_os in objformat="win32" enable dos_paths check_cflags -fno-common + add_cppflags -U__STRICT_ANSI__ ;; *-dos|freedos|opendos) network_extralibs="-lsocket" objformat="coff" enable dos_paths + add_cppflags -U__STRICT_ANSI__ ;; linux) add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600