diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-12 04:16:28 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-12 04:16:28 +0000 |
commit | b116cc7f95b236dce84ed197ba98fb40945a70be (patch) | |
tree | 3a8f23f4df561e5e23669da2d3003a7876914d97 | |
parent | f9942ba94bc554d7a8ec1a3fb9a9acc5f323e01c (diff) | |
download | ffmpeg-streaming-b116cc7f95b236dce84ed197ba98fb40945a70be.zip ffmpeg-streaming-b116cc7f95b236dce84ed197ba98fb40945a70be.tar.gz |
Fix edge emulation for bicubic MC in B frames
Originally committed as revision 6234 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vc1.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 8521d87..cb43dd1 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -2028,7 +2028,8 @@ static void vc1_interp_mc(VC1Context *v) || (unsigned)src_y > s->v_edge_pos - (my&3) - 16){ uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize; - ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17, 17, + srcY -= s->mspel * (1 + s->linesize); + ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2, src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos); srcY = s->edge_emu_buffer; ff_emulated_edge_mc(uvbuf , srcU, s->uvlinesize, 8+1, 8+1, @@ -2043,8 +2044,8 @@ static void vc1_interp_mc(VC1Context *v) uint8_t *src, *src2; src = srcY; - for(j = 0; j < 17; j++) { - for(i = 0; i < 17; i++) src[i] = ((src[i] - 128) >> 1) + 128; + for(j = 0; j < 17 + s->mspel*2; j++) { + for(i = 0; i < 17 + s->mspel*2; i++) src[i] = ((src[i] - 128) >> 1) + 128; src += s->linesize; } src = srcU; src2 = srcV; @@ -2057,6 +2058,7 @@ static void vc1_interp_mc(VC1Context *v) src2 += s->uvlinesize; } } + srcY += s->mspel * (1 + s->linesize); } if(v->fastuvmc) { |