29 #ifndef AVCODEC_X86_H264_I386_H
30 #define AVCODEC_X86_H264_I386_H
47 #if HAVE_7REGS && !BROKEN_COMPILER
48 #define decode_significance decode_significance_x86
49 static int decode_significance_x86(
CABACContext *
c,
int max_coeff,
50 uint8_t *significant_coeff_ctx_base,
52 void *
end= significant_coeff_ctx_base + max_coeff - 1;
53 int minusstart= -(intptr_t)significant_coeff_ctx_base;
54 int minusindex= 4-(intptr_t)index;
58 #ifdef BROKEN_RELOCATIONS
71 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
72 "%5",
"%q5",
"%k0",
"%b0",
73 "%c11(%6)",
"%c12(%6)",
83 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
84 "%5",
"%q5",
"%k0",
"%b0",
85 "%c11(%6)",
"%c12(%6)",
94 "add %1, %%"REG_c
" \n\t"
95 "movl %%ecx, (%0) \n\t"
100 "add"OPSIZE
" $4, %2 \n\t"
107 "movl %7, %%ecx \n\t"
108 "add %1, %%"REG_c
" \n\t"
109 "movl %%ecx, (%0) \n\t"
113 :
"=&q"(coeff_count),
"+r"(significant_coeff_ctx_base),
"+m"(
index),
114 "+&r"(c->
low),
"=&r"(bit),
"+&r"(c->
range)
115 :
"r"(
c),
"m"(minusstart),
"m"(
end),
"m"(minusindex),
"m"(last_off),
124 #define decode_significance_8x8 decode_significance_8x8_x86
126 uint8_t *significant_coeff_ctx_base,
127 int *index,
uint8_t *last_coeff_ctx_base,
const uint8_t *sig_off){
128 int minusindex= 4-(intptr_t)index;
134 #ifdef BROKEN_RELOCATIONS
149 "movzb (%0, %6), %6 \n\t"
152 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
153 "%5",
"%q5",
"%k0",
"%b0",
154 "%c12(%7)",
"%c13(%7)",
164 #ifdef BROKEN_RELOCATIONS
165 "movzb %c14(%15, %q6), %6\n\t"
171 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
172 "%5",
"%q5",
"%k0",
"%b0",
173 "%c12(%7)",
"%c13(%7)",
186 "add"OPSIZE
" $4, %2 \n\t"
198 :
"=&q"(coeff_count),
"+"REG64(last),
"+"REG64(index),
"+&r"(c->
low),
199 "=&r"(bit),
"+&r"(c->
range),
"=&r"(state)
200 :
"r"(
c),
"m"(minusindex),
"m"(significant_coeff_ctx_base),
201 REG64(sig_off), REG64(last_coeff_ctx_base),