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/mpeg12.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/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 97169fa4da..18afa7630f 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1604,7 +1604,10 @@ static int mpeg_decode_slice(AVCodecContext *avctx, h = s->height - y; if (h > 16) h = 16; - offset = y * s->linesize; + if(s->pict_type==B_TYPE) + offset = 0; + else + offset = y * s->linesize; if(s->pict_type==B_TYPE || (!s->has_b_frames)){ src_ptr[0] = s->current_picture[0] + offset; src_ptr[1] = s->current_picture[1] + (offset >> 2); |