diff options
author | Jason Garrett-Glaser <jason@x264.com> | 2011-06-03 01:12:28 -0700 |
---|---|---|
committer | Jason Garrett-Glaser <jason@x264.com> | 2011-06-13 12:21:39 -0700 |
commit | c9c493872c385cff304438ee404e38e55f04af28 (patch) | |
tree | 4c0ee47f9c0c4a00d63423a84a5f30bf2e3b0a92 /libavcodec/x86/h264_i386.h | |
parent | 25f05ddb1af4bd398fa92cd135e48fafe23bd92a (diff) | |
download | ffmpeg-c9c493872c385cff304438ee404e38e55f04af28.tar.gz |
4:4:4 H.264 decoding support
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
Diffstat (limited to 'libavcodec/x86/h264_i386.h')
-rw-r--r-- | libavcodec/x86/h264_i386.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h index c850dc2ef3..b5f77c90d5 100644 --- a/libavcodec/x86/h264_i386.h +++ b/libavcodec/x86/h264_i386.h @@ -36,7 +36,7 @@ #if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE && !defined(BROKEN_RELOCATIONS) static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, - int *index){ + int *index, int last_off){ void *end= significant_coeff_ctx_base + max_coeff - 1; int minusstart= -(int)significant_coeff_ctx_base; int minusindex= 4-(int)index; @@ -52,10 +52,12 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, "test $1, %%edx \n\t" " jz 3f \n\t" + "add %7, %1 \n\t" - BRANCHLESS_GET_CABAC("%%edx", "%3", "61(%1)", "%%ebx", + BRANCHLESS_GET_CABAC("%%edx", "%3", "(%1)", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") + "sub %7, %1 \n\t" "mov %2, %%"REG_a" \n\t" "movl %4, %%ecx \n\t" "add %1, %%"REG_c" \n\t" @@ -82,7 +84,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, "movl %%esi, "RANGE "(%3) \n\t" "movl %%ebx, "LOW "(%3) \n\t" :"=&a"(coeff_count), "+r"(significant_coeff_ctx_base), "+m"(index) - :"r"(c), "m"(minusstart), "m"(end), "m"(minusindex) + :"r"(c), "m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off) : "%"REG_c, "%ebx", "%edx", "%esi", "memory" ); return coeff_count; @@ -90,7 +92,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, static int decode_significance_8x8_x86(CABACContext *c, uint8_t *significant_coeff_ctx_base, - int *index, const uint8_t *sig_off){ + int *index, int last_off, const uint8_t *sig_off){ int minusindex= 4-(int)index; int coeff_count; x86_reg last=0; @@ -114,8 +116,9 @@ static int decode_significance_8x8_x86(CABACContext *c, "movzbl "MANGLE(last_coeff_flag_offset_8x8)"(%%edi), %%edi\n\t" "add %5, %%"REG_D" \n\t" + "add %7, %%"REG_D" \n\t" - BRANCHLESS_GET_CABAC("%%edx", "%3", "15(%%"REG_D")", "%%ebx", + BRANCHLESS_GET_CABAC("%%edx", "%3", "(%%"REG_D")", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") "mov %2, %%"REG_a" \n\t" @@ -142,7 +145,7 @@ static int decode_significance_8x8_x86(CABACContext *c, "movl %%esi, "RANGE "(%3) \n\t" "movl %%ebx, "LOW "(%3) \n\t" :"=&a"(coeff_count),"+m"(last), "+m"(index) - :"r"(c), "m"(minusindex), "m"(significant_coeff_ctx_base), "m"(sig_off) + :"r"(c), "m"(minusindex), "m"(significant_coeff_ctx_base), "m"(sig_off), "m"(last_off) : "%"REG_c, "%ebx", "%edx", "%esi", "%"REG_D, "memory" ); return coeff_count; |