summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Sandberg <sebastiand.sandberg@gmail.com>2013-01-31 18:04:21 +0100
committerMartin Storsjö <martin@martin.st>2013-05-14 12:44:09 +0300
commit1bd57a850a659ac0fcd235efe2191d0b3f1b5d54 (patch)
treeed83a3568316bb180ab6d83cc9952fc6806f4ff7
parent8bbdd20a293eab2cfac9f332613ead02a4e3c0c2 (diff)
downloadffmpeg-streaming-1bd57a850a659ac0fcd235efe2191d0b3f1b5d54.zip
ffmpeg-streaming-1bd57a850a659ac0fcd235efe2191d0b3f1b5d54.tar.gz
vc1dec: fieldtx is only valid for interlaced frame pictures
The fieldtx_plane is not cleared for interlaced fields. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/vc1dec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 04b7efb..c434f69 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -80,7 +80,7 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
{
MpegEncContext *s = &v->s;
int topleft_mb_pos, top_mb_pos;
- int stride_y, fieldtx;
+ int stride_y, fieldtx = 0;
int v_dist;
/* The put pixels loop is always one MB row behind the decoding loop,
@@ -93,7 +93,8 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
if (!s->first_slice_line) {
if (s->mb_x) {
topleft_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x - 1;
- fieldtx = v->fieldtx_plane[topleft_mb_pos];
+ if (v->fcm == ILACE_FRAME)
+ fieldtx = v->fieldtx_plane[topleft_mb_pos];
stride_y = s->linesize << fieldtx;
v_dist = (16 - fieldtx) >> (fieldtx == 0);
s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][0],
@@ -117,7 +118,8 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
}
if (s->mb_x == s->mb_width - 1) {
top_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x;
- fieldtx = v->fieldtx_plane[top_mb_pos];
+ if (v->fcm == ILACE_FRAME)
+ fieldtx = v->fieldtx_plane[top_mb_pos];
stride_y = s->linesize << fieldtx;
v_dist = fieldtx ? 15 : 8;
s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][0],
OpenPOWER on IntegriCloud