summaryrefslogtreecommitdiff
path: root/libavcodec/x86/h264_i386.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-14 15:31:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-14 15:34:39 +0200
commit7427d1ca4ab202def24fc3cefc4401a351d7248c (patch)
treebe2cd06e1e5457daad74966a0155e86baa5e9086 /libavcodec/x86/h264_i386.h
parent0e05908c954ff64ef2fcb2a97ed083bc285282c1 (diff)
parent0d230e9312a676266bd6fa3478032db4860221a7 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: g723.1: simplify scale_vector() g723.1: simplify normalize_bits() vda: cosmetics: fix Doxygen comment formatting vda: better frame allocation vda: Merge implementation into one file vda: support synchronous decoding vda: Reuse the bitstream buffer and reallocate it only if needed build: Factor out mpegvideo encoding dependencies to CONFIG_MPEGVIDEOENC avprobe: Include libm.h for the log2 fallback proresenc: use the edge emulation buffer rtmp: handle bytes read reports configure: Fix typo in mpeg2video/svq1 decoder dependency declaration Use log2(x) instead of log(x) / log(2) x86: swscale: fix fragile memory accesses x86: swscale: remove disabled code x86: yadif: fix asm with suncc x86: cabac: allow building with suncc x86: mlpdsp: avoid taking address of void ARM: intmath: use native-size return types for clipping functions Conflicts: configure ffprobe.c libavcodec/Makefile libavcodec/g723_1.c libavcodec/v210dec.h libavcodec/vda.h libavcodec/vda_h264.c libavcodec/x86/cabac.h libavfilter/x86/yadif_template.c libswscale/x86/rgb2rgb_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/h264_i386.h')
-rw-r--r--libavcodec/x86/h264_i386.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h
index b059cf9423..0dc0a7cb0f 100644
--- a/libavcodec/x86/h264_i386.h
+++ b/libavcodec/x86/h264_i386.h
@@ -63,7 +63,11 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
BRANCHLESS_GET_CABAC("%4", "%q4", "(%1)", "%3", "%w3",
"%5", "%q5", "%k0", "%b0",
- "%a11(%6)", "%a12(%6)", "%a13", "%a14", "%a15", "%16")
+ "%c11(%6)", "%c12(%6)",
+ AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
+ AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
+ AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
+ "%13")
"test $1, %4 \n\t"
" jz 4f \n\t"
@@ -71,7 +75,11 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
BRANCHLESS_GET_CABAC("%4", "%q4", "(%1)", "%3", "%w3",
"%5", "%q5", "%k0", "%b0",
- "%a11(%6)", "%a12(%6)", "%a13", "%a14", "%a15", "%16")
+ "%c11(%6)", "%c12(%6)",
+ AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
+ AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
+ AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
+ "%13")
"sub %10, %1 \n\t"
"mov %2, %0 \n\t"
@@ -99,10 +107,8 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
"+&r"(c->low), "=&r"(bit), "+&r"(c->range)
: "r"(c), "m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off),
"i"(offsetof(CABACContext, bytestream)),
- "i"(offsetof(CABACContext, bytestream_end)),
- "i"(H264_NORM_SHIFT_OFFSET),
- "i"(H264_LPS_RANGE_OFFSET),
- "i"(H264_MLPS_STATE_OFFSET) TABLES_ARG
+ "i"(offsetof(CABACContext, bytestream_end))
+ TABLES_ARG
: "%"REG_c, "memory"
);
return coeff_count;
@@ -137,22 +143,30 @@ static int decode_significance_8x8_x86(CABACContext *c,
BRANCHLESS_GET_CABAC("%4", "%q4", "(%6)", "%3", "%w3",
"%5", "%q5", "%k0", "%b0",
- "%a12(%7)", "%a13(%7)", "%a14", "%a15", "%a16", "%18")
+ "%c12(%7)", "%c13(%7)",
+ AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
+ AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
+ AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
+ "%15")
"mov %1, %k6 \n\t"
"test $1, %4 \n\t"
" jz 4f \n\t"
#ifdef BROKEN_RELOCATIONS
- "movzbl %a17(%18, %q6), %k6\n\t"
+ "movzbl %c14(%15, %q6), %k6\n\t"
#else
- "movzbl "MANGLE(ff_h264_cabac_tables)"+%a17(%k6), %k6\n\t"
+ "movzbl "MANGLE(ff_h264_cabac_tables)"+%c14(%k6), %k6\n\t"
#endif
"add %11, %6 \n\t"
BRANCHLESS_GET_CABAC("%4", "%q4", "(%6)", "%3", "%w3",
"%5", "%q5", "%k0", "%b0",
- "%a12(%7)", "%a13(%7)", "%a14", "%a15", "%a16", "%18")
+ "%c12(%7)", "%c13(%7)",
+ AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
+ AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
+ AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
+ "%15")
"mov %2, %0 \n\t"
"mov %1, %k6 \n\t"
@@ -179,9 +193,6 @@ static int decode_significance_8x8_x86(CABACContext *c,
"m"(sig_off), "m"(last_coeff_ctx_base),
"i"(offsetof(CABACContext, bytestream)),
"i"(offsetof(CABACContext, bytestream_end)),
- "i"(H264_NORM_SHIFT_OFFSET),
- "i"(H264_LPS_RANGE_OFFSET),
- "i"(H264_MLPS_STATE_OFFSET),
"i"(H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET) TABLES_ARG
: "%"REG_c, "memory"
);