diff options
author | Ivan Kalvachev | 2009-02-22 09:02:06 +0000 |
---|---|---|
committer | Ivan Kalvachev | 2009-02-22 09:02:06 +0000 |
commit | 21effaa4b20bbd34ecc11e5bef1211dcca6fc2bc (patch) | |
tree | 1133d9773a2f902e9bfbcb694fc6364bb31409d9 /libavcodec/mpeg12.c | |
parent | d8f28a77270b2d94fea92d56c8737eb626adce8d (diff) |
Change the type of pblocks from pointers to short array into
pointers to array of 64 DCTELEM, similarly to other block fields.
This also get rid of some casts and fixes a warning.
Originally committed as revision 17517 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 6cf03356de..343858289f 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -308,17 +308,17 @@ static int mpeg_decode_mb(MpegEncContext *s, if (s->codec_id == CODEC_ID_MPEG2VIDEO) { if(s->flags2 & CODEC_FLAG2_FAST){ for(i=0;i<6;i++) { - mpeg2_fast_decode_block_intra(s, s->pblocks[i], i); + mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i); } }else{ for(i=0;i<mb_block_count;i++) { - if (mpeg2_decode_block_intra(s, s->pblocks[i], i) < 0) + if (mpeg2_decode_block_intra(s, *s->pblocks[i], i) < 0) return -1; } } } else { for(i=0;i<6;i++) { - if (ff_mpeg1_decode_block_intra(s, s->pblocks[i], i) < 0) + if (ff_mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0) return -1; } } @@ -520,7 +520,7 @@ static int mpeg_decode_mb(MpegEncContext *s, if(s->flags2 & CODEC_FLAG2_FAST){ for(i=0;i<6;i++) { if(cbp & 32) { - mpeg2_fast_decode_block_non_intra(s, s->pblocks[i], i); + mpeg2_fast_decode_block_non_intra(s, *s->pblocks[i], i); } else { s->block_last_index[i] = -1; } @@ -531,7 +531,7 @@ static int mpeg_decode_mb(MpegEncContext *s, for(i=0;i<mb_block_count;i++) { if ( cbp & (1<<11) ) { - if (mpeg2_decode_block_non_intra(s, s->pblocks[i], i) < 0) + if (mpeg2_decode_block_non_intra(s, *s->pblocks[i], i) < 0) return -1; } else { s->block_last_index[i] = -1; @@ -543,7 +543,7 @@ static int mpeg_decode_mb(MpegEncContext *s, if(s->flags2 & CODEC_FLAG2_FAST){ for(i=0;i<6;i++) { if (cbp & 32) { - mpeg1_fast_decode_block_inter(s, s->pblocks[i], i); + mpeg1_fast_decode_block_inter(s, *s->pblocks[i], i); } else { s->block_last_index[i] = -1; } @@ -552,7 +552,7 @@ static int mpeg_decode_mb(MpegEncContext *s, }else{ for(i=0;i<6;i++) { if (cbp & 32) { - if (mpeg1_decode_block_inter(s, s->pblocks[i], i) < 0) + if (mpeg1_decode_block_inter(s, *s->pblocks[i], i) < 0) return -1; } else { s->block_last_index[i] = -1; @@ -1595,7 +1595,9 @@ static void mpeg_decode_extension(AVCodecContext *avctx, } static void exchange_uv(MpegEncContext *s){ - short * tmp = s->pblocks[4]; + DCTELEM (*tmp)[64]; + + tmp = s->pblocks[4]; s->pblocks[4] = s->pblocks[5]; s->pblocks[5] = tmp; } |