From 186dcbcb50653a7e7c49e7eda3b44734e074db3c Mon Sep 17 00:00:00 2001 From: Aneesh Dogra Date: Sun, 12 Feb 2012 17:48:49 +0000 Subject: [PATCH 1/2] sunrast: Add fate test for gray8. Signed-off-by: Janne Grunau --- tests/fate/image.mak | 3 +++ tests/ref/fate/sunraster-8bit_gray-raw | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 tests/ref/fate/sunraster-8bit_gray-raw diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 1d3dbc10e9..dc78302e63 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -16,6 +16,9 @@ fate-sunraster-1bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-1bit-rle.su FATE_SUNRASTER += fate-sunraster-8bit-raw fate-sunraster-8bit-raw: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-raw.sun -pix_fmt rgb24 +FATE_SUNRASTER += fate-sunraster-8bit_gray-raw +fate-sunraster-8bit_gray-raw: CMD = framecrc -i $(SAMPLES)/sunraster/gray.ras + FATE_SUNRASTER += fate-sunraster-8bit-rle fate-sunraster-8bit-rle: CMD = framecrc -i $(SAMPLES)/sunraster/lena-8bit-rle.sun -pix_fmt rgb24 diff --git a/tests/ref/fate/sunraster-8bit_gray-raw b/tests/ref/fate/sunraster-8bit_gray-raw new file mode 100644 index 0000000000..455af5f612 --- /dev/null +++ b/tests/ref/fate/sunraster-8bit_gray-raw @@ -0,0 +1,2 @@ +#tb 0: 1/25 +0, 0, 0, 1, 786432, 0x5859b48e From 771bab7f573fdb4a5c9456ecaabf15c5a14a22b0 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 13 Feb 2012 13:28:50 -0800 Subject: [PATCH 2/2] swscale: fix crashes in yuv2yuvX on x86-32. They were introduced in an earlier commit that introduced use of named arguments. One cause was a typo, a second cause appears to be a bug in x264asm that I work around by not using named arguments. --- libswscale/x86/output.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm index 6017bf13e0..c4daa8230c 100644 --- a/libswscale/x86/output.asm +++ b/libswscale/x86/output.asm @@ -59,7 +59,7 @@ SECTION .text %macro yuv2planeX_fn 3 %if ARCH_X86_32 -%define cntr_reg filterq +%define cntr_reg fltsizeq %define movsx mov %else %define cntr_reg r11 @@ -146,7 +146,7 @@ cglobal yuv2planeX_%1, %3, 7, %2, filter, fltsize, src, dst, w, dither, offset mova m1, [yuv2yuvX_%1_start] mova m2, m1 %endif ; %1 == 8/9/10/16 - movsx cntr_reg, fltsizem + movsx cntr_reg, r1m ; FIXME should be fltsizem, but the assembler does the wrong thing b/c of SUB above .filterloop_ %+ %%i: ; input pixels mov r6, [srcq+gprsize*cntr_reg-2*gprsize]