diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-07 15:24:50 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-07 15:24:50 +0000 |
commit | 0dc5dc08db8aa8f0c05376bc93be979bf76a0bb5 (patch) | |
tree | 2aac688a84fc7b3710de3bfcc354783128aef41b /libavcodec/h263.c | |
parent | 64f716b499914e55a09e013a4b721c69a46724fd (diff) | |
download | ffmpeg-0dc5dc08db8aa8f0c05376bc93be979bf76a0bb5.tar.gz |
Move restore_ac_coeffs() up so its declared before its use.
Originally committed as revision 21061 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 6df9be71ff..5b0ea567ef 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -368,6 +368,29 @@ static inline int get_block_rate(MpegEncContext * s, DCTELEM block[64], int bloc return rate; } +static inline void restore_ac_coeffs(MpegEncContext * s, DCTELEM block[6][64], int dir[6], uint8_t *st[6], int zigzag_last_index[6]) +{ + int i, n; + memcpy(s->block_last_index, zigzag_last_index, sizeof(int)*6); + + for(n=0; n<6; n++){ + int16_t *ac_val = s->ac_val[0][0] + s->block_index[n] * 16; + + st[n]= s->intra_scantable.permutated; + if(dir[n]){ + /* top prediction */ + for(i=1; i<8; i++){ + block[n][s->dsp.idct_permutation[i ]] = ac_val[i+8]; + } + }else{ + /* left prediction */ + for(i=1; i<8; i++){ + block[n][s->dsp.idct_permutation[i<<3]]= ac_val[i ]; + } + } + } +} + /** * Returns the optimal value (0 or 1) for the ac_pred element for the given MB in mpeg4. */ @@ -442,29 +465,6 @@ static inline int decide_ac_pred(MpegEncContext * s, DCTELEM block[6][64], int d return score < 0; } -static inline void restore_ac_coeffs(MpegEncContext * s, DCTELEM block[6][64], int dir[6], uint8_t *st[6], int zigzag_last_index[6]) -{ - int i, n; - memcpy(s->block_last_index, zigzag_last_index, sizeof(int)*6); - - for(n=0; n<6; n++){ - int16_t *ac_val = s->ac_val[0][0] + s->block_index[n] * 16; - - st[n]= s->intra_scantable.permutated; - if(dir[n]){ - /* top prediction */ - for(i=1; i<8; i++){ - block[n][s->dsp.idct_permutation[i ]] = ac_val[i+8]; - } - }else{ - /* left prediction */ - for(i=1; i<8; i++){ - block[n][s->dsp.idct_permutation[i<<3]]= ac_val[i ]; - } - } - } -} - /** * modify qscale so that encoding is acually possible in h263 (limit difference to -2..2) */ |