29 #ifndef AVCODEC_X86_H264_I386_H
30 #define AVCODEC_X86_H264_I386_H
41 #if HAVE_7REGS && !BROKEN_COMPILER
42 #define decode_significance decode_significance_x86
43 static int decode_significance_x86(
CABACContext *
c,
int max_coeff,
44 uint8_t *significant_coeff_ctx_base,
46 void *
end= significant_coeff_ctx_base + max_coeff - 1;
47 int minusstart= -(intptr_t)significant_coeff_ctx_base;
48 int minusindex= 4-(intptr_t)index;
52 #ifdef BROKEN_RELOCATIONS
65 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
66 "%5",
"%q5",
"%k0",
"%b0",
67 "%c11(%6)",
"%c12(%6)",
77 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
78 "%5",
"%q5",
"%k0",
"%b0",
79 "%c11(%6)",
"%c12(%6)",
88 "add %1, %%"REG_c
" \n\t"
89 "movl %%ecx, (%0) \n\t"
94 "add"OPSIZE
" $4, %2 \n\t"
101 "movl %7, %%ecx \n\t"
102 "add %1, %%"REG_c
" \n\t"
103 "movl %%ecx, (%0) \n\t"
107 :
"=&q"(coeff_count),
"+r"(significant_coeff_ctx_base),
"+m"(
index),
108 "+&r"(c->
low),
"=&r"(bit),
"+&r"(c->
range)
109 :
"r"(
c),
"m"(minusstart),
"m"(
end),
"m"(minusindex),
"m"(last_off),
118 #define decode_significance_8x8 decode_significance_8x8_x86
120 uint8_t *significant_coeff_ctx_base,
121 int *index,
uint8_t *last_coeff_ctx_base,
const uint8_t *sig_off){
122 int minusindex= 4-(intptr_t)index;
128 #ifdef BROKEN_RELOCATIONS
143 "movzbl (%0, %6), %k6 \n\t"
146 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
147 "%5",
"%q5",
"%k0",
"%b0",
148 "%c12(%7)",
"%c13(%7)",
158 #ifdef BROKEN_RELOCATIONS
159 "movzbl %c14(%15, %q6), %k6\n\t"
165 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
166 "%5",
"%q5",
"%k0",
"%b0",
167 "%c12(%7)",
"%c13(%7)",
175 "movl %k6, (%0) \n\t"
180 "add"OPSIZE
" $4, %2 \n\t"
188 "movl %k6, (%0) \n\t"
192 :
"=&q"(coeff_count),
"+m"(last),
"+m"(
index),
"+&r"(c->
low),
194 :
"r"(c),
"m"(minusindex),
"m"(significant_coeff_ctx_base),
195 "m"(sig_off),
"m"(last_coeff_ctx_base),