diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-12 01:34:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-12 01:43:12 +0100 |
commit | 8e749733c13554dd61554f3bd2c7f25625c4cc63 (patch) | |
tree | 76c5202f2d74f30dc162d41b37dcd75ff260b413 /libavcodec/vc1dec.c | |
parent | b5f4836f8cb374f1a5ae45db48b61a1dfba0daad (diff) | |
download | ffmpeg-8e749733c13554dd61554f3bd2c7f25625c4cc63.tar.gz |
vc1dec: factorize srcU/V offseting out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 7c07138007..488892cbfb 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -844,21 +844,24 @@ static void vc1_mc_4mv_chroma(VC1Context *v, int dir) if (!dir) { if (v->field_mode) { if ((v->cur_field_type != chroma_ref_type) && v->cur_field_type) { - srcU = s->current_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; - srcV = s->current_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcU = s->current_picture.f.data[1]; + srcV = s->current_picture.f.data[2]; } else { - srcU = s->last_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; - srcV = s->last_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcU = s->last_picture.f.data[1]; + srcV = s->last_picture.f.data[2]; } } else { - srcU = s->last_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; - srcV = s->last_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcU = s->last_picture.f.data[1]; + srcV = s->last_picture.f.data[2]; } } else { - srcU = s->next_picture.f.data[1] + uvsrc_y * s->uvlinesize + uvsrc_x; - srcV = s->next_picture.f.data[2] + uvsrc_y * s->uvlinesize + uvsrc_x; + srcU = s->next_picture.f.data[1]; + srcV = s->next_picture.f.data[2]; } + srcU += uvsrc_y * s->uvlinesize + uvsrc_x; + srcV += uvsrc_y * s->uvlinesize + uvsrc_x; + if (v->field_mode) { if (chroma_ref_type) { srcU += s->current_picture_ptr->f.linesize[1]; |