diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-05-31 15:49:52 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-06-08 12:39:42 +0100 |
commit | da0c8664b4dc906696803685f7e53ade68594ab8 (patch) | |
tree | d4a58741d14a1061ca41f3c860b124b17546670e /libavcodec/vc1_mc.c | |
parent | a6f19d6a9f8d1e08653d9d77581e8c823f4955c2 (diff) | |
download | ffmpeg-da0c8664b4dc906696803685f7e53ade68594ab8.tar.gz |
mpegvideo: Move various temporary buffers to a separate context
Diffstat (limited to 'libavcodec/vc1_mc.c')
-rw-r--r-- | libavcodec/vc1_mc.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c index 4dcb2f5a54..be1f52c9f6 100644 --- a/libavcodec/vc1_mc.c +++ b/libavcodec/vc1_mc.c @@ -137,23 +137,23 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) /* for grayscale we should not try to read from unknown area */ if (s->avctx->flags & CODEC_FLAG_GRAY) { - srcU = s->edge_emu_buffer + 18 * s->linesize; - srcV = s->edge_emu_buffer + 18 * s->linesize; + srcU = s->sc.edge_emu_buffer + 18 * s->linesize; + srcV = s->sc.edge_emu_buffer + 18 * s->linesize; } if (v->rangeredfrm || use_ic || s->h_edge_pos < 22 || v_edge_pos < 22 || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel * 3 || (unsigned)(src_y - 1) > v_edge_pos - (my&3) - 16 - 3) { - uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize; + uint8_t *uvbuf = s->sc.edge_emu_buffer + 19 * s->linesize; srcY -= s->mspel * (1 + s->linesize); - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcY, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcY, s->linesize, s->linesize, 17 + s->mspel * 2, 17 + s->mspel * 2, src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, v_edge_pos); - srcY = s->edge_emu_buffer; + srcY = s->sc.edge_emu_buffer; s->vdsp.emulated_edge_mc(uvbuf, srcU, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, @@ -395,12 +395,12 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg) || (unsigned)(src_y - (s->mspel << fieldmv)) > v_edge_pos - (my & 3) - ((8 + s->mspel * 2) << fieldmv)) { srcY -= s->mspel * (1 + (s->linesize << fieldmv)); /* check emulate edge stride and offset */ - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcY, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcY, s->linesize, s->linesize, 9 + s->mspel * 2, (9 + s->mspel * 2) << fieldmv, src_x - s->mspel, src_y - (s->mspel << fieldmv), s->h_edge_pos, v_edge_pos); - srcY = s->edge_emu_buffer; + srcY = s->sc.edge_emu_buffer; /* if we deal with range reduction we need to scale source blocks */ if (v->rangeredfrm) { int i, j; @@ -611,16 +611,16 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) || s->h_edge_pos < 18 || v_edge_pos < 18 || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 9 || (unsigned)uvsrc_y > (v_edge_pos >> 1) - 9) { - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcU, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcU, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); - s->vdsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer + 16, srcV, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); - srcU = s->edge_emu_buffer; - srcV = s->edge_emu_buffer + 16; + srcU = s->sc.edge_emu_buffer; + srcV = s->sc.edge_emu_buffer + 16; /* if we deal with range reduction we need to scale source blocks */ if (v->rangeredfrm) { @@ -729,16 +729,16 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) || s->h_edge_pos < 10 || v_edge_pos < (5 << fieldmv) || (unsigned)uvsrc_x > (s->h_edge_pos >> 1) - 5 || (unsigned)uvsrc_y > v_edge_pos - (5 << fieldmv)) { - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcU, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcU, s->uvlinesize, s->uvlinesize, 5, (5 << fieldmv), uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos); - s->vdsp.emulated_edge_mc(s->edge_emu_buffer + 16, srcV, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer + 16, srcV, s->uvlinesize, s->uvlinesize, 5, (5 << fieldmv), uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos); - srcU = s->edge_emu_buffer; - srcV = s->edge_emu_buffer + 16; + srcU = s->sc.edge_emu_buffer; + srcV = s->sc.edge_emu_buffer + 16; /* if we deal with intensity compensation we need to scale source blocks */ if (use_ic) { @@ -838,22 +838,22 @@ void ff_vc1_interp_mc(VC1Context *v) /* for grayscale we should not try to read from unknown area */ if (s->avctx->flags & CODEC_FLAG_GRAY) { - srcU = s->edge_emu_buffer + 18 * s->linesize; - srcV = s->edge_emu_buffer + 18 * s->linesize; + srcU = s->sc.edge_emu_buffer + 18 * s->linesize; + srcV = s->sc.edge_emu_buffer + 18 * s->linesize; } if (v->rangeredfrm || s->h_edge_pos < 22 || v_edge_pos < 22 || use_ic || (unsigned)(src_x - 1) > s->h_edge_pos - (mx & 3) - 16 - 3 || (unsigned)(src_y - 1) > v_edge_pos - (my & 3) - 16 - 3) { - uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize; + uint8_t *uvbuf = s->sc.edge_emu_buffer + 19 * s->linesize; srcY -= s->mspel * (1 + s->linesize); - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcY, + s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcY, s->linesize, s->linesize, 17 + s->mspel * 2, 17 + s->mspel * 2, src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, v_edge_pos); - srcY = s->edge_emu_buffer; + srcY = s->sc.edge_emu_buffer; s->vdsp.emulated_edge_mc(uvbuf, srcU, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, |