29 #ifndef AVCODEC_X86_H264_I386_H
30 #define AVCODEC_X86_H264_I386_H
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
64 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
65 "%5",
"%q5",
"%k0",
"%b0",
66 "%c11(%6)",
"%c12(%6)",
76 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%1)",
"%3",
"%w3",
77 "%5",
"%q5",
"%k0",
"%b0",
78 "%c11(%6)",
"%c12(%6)",
87 "add %1, %%"REG_c
" \n\t"
88 "movl %%ecx, (%0) \n\t"
93 "add"OPSIZE
" $4, %2 \n\t"
100 "movl %7, %%ecx \n\t"
101 "add %1, %%"REG_c
" \n\t"
102 "movl %%ecx, (%0) \n\t"
106 :
"=&q"(coeff_count),
"+r"(significant_coeff_ctx_base),
"+m"(
index),
107 "+&r"(
c->low),
"=&r"(bit),
"+&r"(
c->range)
108 :
"r"(
c),
"m"(minusstart),
"m"(
end),
"m"(minusindex),
"m"(last_off),
117 #define decode_significance_8x8 decode_significance_8x8_x86
119 uint8_t *significant_coeff_ctx_base,
121 int minusindex= 4-(intptr_t)index;
127 #ifdef BROKEN_RELOCATIONS
141 "movzbl (%0, %6), %k6 \n\t"
144 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
145 "%5",
"%q5",
"%k0",
"%b0",
146 "%c12(%7)",
"%c13(%7)",
156 #ifdef BROKEN_RELOCATIONS
157 "movzbl %c14(%15, %q6), %k6\n\t"
163 BRANCHLESS_GET_CABAC(
"%4",
"%q4",
"(%6)",
"%3",
"%w3",
164 "%5",
"%q5",
"%k0",
"%b0",
165 "%c12(%7)",
"%c13(%7)",
173 "movl %k6, (%0) \n\t"
178 "add"OPSIZE
" $4, %2 \n\t"
186 "movl %k6, (%0) \n\t"
190 :
"=&q"(coeff_count),
"+m"(last),
"+m"(
index),
"+&r"(
c->low),
191 "=&r"(bit),
"+&r"(
c->range),
"=&r"(
state)
192 :
"r"(
c),
"m"(minusindex),
"m"(significant_coeff_ctx_base),
193 "m"(sig_off),
"m"(last_coeff_ctx_base),