aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-04-14 19:26:33 +0000
committerDavid Conrad <lessen42@gmail.com>2009-04-14 19:26:33 +0000
commit6cecd63005b29a1dc3a5104e6ac85fd112705122 (patch)
treee32137ac20373aaca1df988efd73c3f7a5545b16 /libavcodec/vc1.c
parent44be8d4278a04cb07baceadab48dde8df7aeeb05 (diff)
downloadffmpeg-6cecd63005b29a1dc3a5104e6ac85fd112705122.tar.gz
VC1: Do qpel when needed for both MVs in a B frame
Originally committed as revision 18511 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r--libavcodec/vc1.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index ef6f8b278a..7d0387eb08 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1904,11 +1904,21 @@ static void vc1_interp_mc(VC1Context *v)
srcY += s->mspel * (1 + s->linesize);
}
- mx >>= 1;
- my >>= 1;
- dxy = ((my & 1) << 1) | (mx & 1);
+ if(s->mspel) {
+ dxy = ((my & 3) << 2) | (mx & 3);
+ dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] , srcY , s->linesize, v->rnd);
+ dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd);
+ srcY += s->linesize * 8;
+ dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize , srcY , s->linesize, v->rnd);
+ dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd);
+ } else { // hpel mc
+ dxy = (my & 2) | ((mx & 2) >> 1);
- dsp->avg_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16);
+ if(!v->rnd)
+ dsp->avg_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16);
+ else
+ dsp->avg_no_rnd_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16);
+ }
if(s->flags & CODEC_FLAG_GRAY) return;
/* Chroma MC always uses qpel blilinear */