summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h b/chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h
index e71dbf8ed0f..810cc8dcd81 100644
--- a/chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h
+++ b/chromium/third_party/ffmpeg/libavcodec/x86/vp56_arith.h
@@ -24,29 +24,26 @@
#ifndef AVCODEC_X86_VP56_ARITH_H
#define AVCODEC_X86_VP56_ARITH_H
-#if HAVE_INLINE_ASM && HAVE_FAST_CMOV
+#if HAVE_INLINE_ASM && HAVE_FAST_CMOV && HAVE_6REGS
#define vp56_rac_get_prob vp56_rac_get_prob
static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
{
unsigned int code_word = vp56_rac_renorm(c);
- unsigned int high = c->high;
- unsigned int low = 1 + (((high - 1) * prob) >> 8);
+ unsigned int low = 1 + (((c->high - 1) * prob) >> 8);
unsigned int low_shift = low << 16;
int bit = 0;
+ c->code_word = code_word;
__asm__(
"subl %4, %1 \n\t"
"subl %3, %2 \n\t"
- "leal (%2, %3), %3 \n\t"
"setae %b0 \n\t"
"cmovb %4, %1 \n\t"
- "cmovb %3, %2 \n\t"
- : "+q"(bit), "+r"(high), "+r"(code_word), "+r"(low_shift)
- : "r"(low)
+ "cmovb %5, %2 \n\t"
+ : "+q"(bit), "+&r"(c->high), "+&r"(c->code_word)
+ : "r"(low_shift), "r"(low), "r"(code_word)
);
- c->high = high;
- c->code_word = code_word;
return bit;
}
#endif