diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 20:58:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 20:58:32 +0200 |
commit | 21d8e2c0b5aa5bae900fcfeb7f29de1d2261c2bd (patch) | |
tree | 523311bf8fdd47ee226bfd0530fd7863a4b38bdc /libavcodec/mpegvideo.c | |
parent | d784d6b7ed254dd61e4802da7d0c0c2b4894daab (diff) | |
parent | d1dd0d404c085f4fce7b8358b4aea677761c5d88 (diff) |
Merge commit 'd1dd0d404c085f4fce7b8358b4aea677761c5d88'
* commit 'd1dd0d404c085f4fce7b8358b4aea677761c5d88':
mpegvideo: Move block permutation function where is used
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index b653d47530..420d73f85e 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2734,35 +2734,6 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename } } -/** - * Permute an 8x8 block. - * @param block the block which will be permuted according to the given permutation vector - * @param permutation the permutation vector - * @param last the last non zero coefficient in scantable order, used to speed the permutation up - * @param scantable the used scantable, this is only used to speed the permutation up, the block is not - * (inverse) permutated to scantable order! - */ -void ff_block_permute(int16_t *block, uint8_t *permutation, const uint8_t *scantable, int last) -{ - int i; - int16_t temp[64]; - - if(last<=0) return; - //if(permutation[1]==1) return; //FIXME it is ok but not clean and might fail for some permutations - - for(i=0; i<=last; i++){ - const int j= scantable[i]; - temp[j]= block[j]; - block[j]=0; - } - - for(i=0; i<=last; i++){ - const int j= scantable[i]; - const int perm_j= permutation[j]; - block[perm_j]= temp[j]; - } -} - void ff_mpeg_flush(AVCodecContext *avctx){ int i; MpegEncContext *s = avctx->priv_data; |