diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-04-17 12:53:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-04-17 12:53:11 +0000 |
commit | 6e21a5b1ae208aa77b70207207e7048ed841f889 (patch) | |
tree | f02ec13e3da9e460982894478a718f7f9c7f088a | |
parent | 2a47a2666d9ebea27b5c4ecd295c19af1e5ebe79 (diff) | |
download | ffmpeg-6e21a5b1ae208aa77b70207207e7048ed841f889.tar.gz |
Move declarations in mpeg1_encode_motion() closer to where they are needed.
Originally committed as revision 18546 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpeg12enc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 50a66205ea..1b5632dbcb 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -666,18 +666,17 @@ void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int // RAL: Parameter added: f_or_b_code static void mpeg1_encode_motion(MpegEncContext *s, int val, int f_or_b_code) { - int code, bit_size, l, bits, range, sign; - if (val == 0) { /* zero vector */ put_bits(&s->pb, ff_mpeg12_mbMotionVectorTable[0][1], ff_mpeg12_mbMotionVectorTable[0][0]); } else { - bit_size = f_or_b_code - 1; - range = 1 << bit_size; + int code, sign, bits; + int bit_size = f_or_b_code - 1; + int range = 1 << bit_size; /* modulo encoding */ - l= INT_BIT - 5 - bit_size; + int l= INT_BIT - 5 - bit_size; val= (val<<l)>>l; if (val >= 0) { |