Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: source/patched-ffmpeg-mt/libavcodec/x86/vp56_arith.h

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * VP5 and VP6 compatible video decoder (arith decoder) 2 * VP5 and VP6 compatible video decoder (arith decoder)
3 * 3 *
4 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org> 4 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
5 * Copyright (C) 2010 Eli Friedman 5 * Copyright (C) 2010 Eli Friedman
6 * 6 *
7 * This file is part of FFmpeg. 7 * This file is part of FFmpeg.
8 * 8 *
9 * FFmpeg is free software; you can redistribute it and/or 9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 13 matching lines...) Expand all
24 #ifndef AVCODEC_X86_VP56_ARITH_H 24 #ifndef AVCODEC_X86_VP56_ARITH_H
25 #define AVCODEC_X86_VP56_ARITH_H 25 #define AVCODEC_X86_VP56_ARITH_H
26 26
27 #if HAVE_FAST_CMOV 27 #if HAVE_FAST_CMOV
28 #define vp56_rac_get_prob vp56_rac_get_prob 28 #define vp56_rac_get_prob vp56_rac_get_prob
29 static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) 29 static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
30 { 30 {
31 unsigned int code_word = vp56_rac_renorm(c); 31 unsigned int code_word = vp56_rac_renorm(c);
32 unsigned int high = c->high; 32 unsigned int high = c->high;
33 unsigned int low = 1 + (((high - 1) * prob) >> 8); 33 unsigned int low = 1 + (((high - 1) * prob) >> 8);
34 unsigned int low_shift = low << 8; 34 unsigned int low_shift = low << 16;
35 int bit = 0; 35 int bit = 0;
36 36
37 __asm__( 37 __asm__(
38 "subl %4, %1 \n\t" 38 "subl %4, %1 \n\t"
39 "subl %3, %2 \n\t" 39 "subl %3, %2 \n\t"
40 "leal (%2, %3), %3 \n\t" 40 "leal (%2, %3), %3 \n\t"
41 "setae %b0 \n\t" 41 "setae %b0 \n\t"
42 "cmovb %4, %1 \n\t" 42 "cmovb %4, %1 \n\t"
43 "cmovb %3, %2 \n\t" 43 "cmovb %3, %2 \n\t"
44 : "+q"(bit), "+r"(high), "+r"(code_word), "+r"(low_shift) 44 : "+q"(bit), "+r"(high), "+r"(code_word), "+r"(low_shift)
45 : "r"(low) 45 : "r"(low)
46 ); 46 );
47 47
48 c->high = high; 48 c->high = high;
49 c->code_word = code_word; 49 c->code_word = code_word;
50 return bit; 50 return bit;
51 } 51 }
52 #endif 52 #endif
53 53
54 #endif /* AVCODEC_X86_VP56_ARITH_H */ 54 #endif /* AVCODEC_X86_VP56_ARITH_H */
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavcodec/x86/vp3dsp_sse2.c ('k') | source/patched-ffmpeg-mt/libavcodec/x86/vp56dsp.asm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698