diff options
Diffstat (limited to 'libavcodec/x86/cabac.h')
-rw-r--r-- | libavcodec/x86/cabac.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h index 389f155745..a74cf0bf1f 100644 --- a/libavcodec/x86/cabac.h +++ b/libavcodec/x86/cabac.h @@ -173,14 +173,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; @@ -192,8 +194,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" @@ -204,17 +206,17 @@ 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" "addl %%edx, %%eax \n\t" - "cmp %a5(%2), %1 \n\t" + "cmp %c5(%2), %1 \n\t" "jge 1f \n\t" - "add"OPSIZE" $2, %a4(%2) \n\t" + "add"OPSIZE" $2, %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), |