summaryrefslogtreecommitdiff
path: root/libavcodec/x86/cabac.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/cabac.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/cabac.h')
-rw-r--r--libavcodec/x86/cabac.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index dc61a5bce2..dbac83f858 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -169,14 +169,16 @@ static av_always_inline int get_cabac_inline_x86(CABACContext *c,
__asm__ volatile(
BRANCHLESS_GET_CABAC("%0", "%q0", "(%4)", "%1", "%w1",
"%2", "%q2", "%3", "%b3",
- "%a6(%5)", "%a7(%5)", "%a8", "%a9", "%a10", "%11")
+ "%c6(%5)", "%c7(%5)",
+ AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
+ AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
+ AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
+ "%8")
: "=&r"(bit), "+&r"(c->low), "+&r"(c->range), "=&q"(tmp)
: "r"(state), "r"(c),
"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 bit & 1;
@@ -188,8 +190,8 @@ static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)
{
x86_reg tmp;
__asm__ volatile(
- "movl %a6(%2), %k1 \n\t"
- "movl %a3(%2), %%eax \n\t"
+ "movl %c6(%2), %k1 \n\t"
+ "movl %c3(%2), %%eax \n\t"
"shl $17, %k1 \n\t"
"add %%eax, %%eax \n\t"
"sub %k1, %%eax \n\t"
@@ -200,16 +202,16 @@ static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val)
"sub %%edx, %%ecx \n\t"
"test %%ax, %%ax \n\t"
"jnz 1f \n\t"
- "mov %a4(%2), %1 \n\t"
+ "mov %c4(%2), %1 \n\t"
"subl $0xFFFF, %%eax \n\t"
"movzwl (%1), %%edx \n\t"
"bswap %%edx \n\t"
"shrl $15, %%edx \n\t"
"add $2, %1 \n\t"
"addl %%edx, %%eax \n\t"
- "mov %1, %a4(%2) \n\t"
+ "mov %1, %c4(%2) \n\t"
"1: \n\t"
- "movl %%eax, %a3(%2) \n\t"
+ "movl %%eax, %c3(%2) \n\t"
: "+c"(val), "=&r"(tmp)
: "r"(c),