diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-10-02 17:07:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-10-02 17:07:39 +0000 |
commit | 3994623df2efd2749631c3492184dd8d4ffa9d1b (patch) | |
tree | 9e1b55c14033be8ef27d1f670316f007d4a00e51 /libavcodec/mpegvideo.c | |
parent | ce5b7c5e1134eb3f00422839c4a842f0f7d24e40 (diff) | |
download | ffmpeg-3994623df2efd2749631c3492184dd8d4ffa9d1b.tar.gz |
optimization
Originally committed as revision 992 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 5c487a1ef2..9ff046e059 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1684,9 +1684,15 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) } } - dest_y = s->current_picture [0] + (mb_y * 16* s->linesize ) + mb_x * 16; - dest_cb = s->current_picture[1] + (mb_y * 8 * s->uvlinesize) + mb_x * 8; - dest_cr = s->current_picture[2] + (mb_y * 8 * s->uvlinesize) + mb_x * 8; + if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band){ + dest_y = s->current_picture [0] + mb_x * 16; + dest_cb = s->current_picture[1] + mb_x * 8; + dest_cr = s->current_picture[2] + mb_x * 8; + }else{ + dest_y = s->current_picture [0] + (mb_y * 16* s->linesize ) + mb_x * 16; + dest_cb = s->current_picture[1] + (mb_y * 8 * s->uvlinesize) + mb_x * 8; + dest_cr = s->current_picture[2] + (mb_y * 8 * s->uvlinesize) + mb_x * 8; + } if (s->interlaced_dct) { dct_linesize = s->linesize * 2; |