mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
simplify ff_h263_round_chroma()
Originally committed as revision 9602 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
efb6836fe3
commit
c3d0c11bfb
@ -765,14 +765,9 @@ static inline int get_bits_diff(MpegEncContext *s){
|
||||
static inline int ff_h263_round_chroma(int x){
|
||||
static const uint8_t h263_chroma_roundtab[16] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
|
||||
0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
|
||||
};
|
||||
if (x >= 0)
|
||||
return (h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1));
|
||||
else {
|
||||
x = -x;
|
||||
return -(h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1));
|
||||
}
|
||||
return h263_chroma_roundtab[x & 0xf] + (x >> 3);
|
||||
}
|
||||
|
||||
/* motion_est.c */
|
||||
|
Loading…
Reference in New Issue
Block a user