[FFmpeg-cvslog] vc1dec: factorize srcU/V offseting out
Michael Niedermayer
git at videolan.org
Mon Nov 12 01:53:14 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 12 01:34:44 2012 +0100| [8e749733c13554dd61554f3bd2c7f25625c4cc63] | committer: Michael Niedermayer
vc1dec: factorize srcU/V offseting out
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e749733c13554dd61554f3bd2c7f25625c4cc63
---
libavcodec/vc1dec.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 7c07138..488892c 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];
More information about the ffmpeg-cvslog
mailing list