aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/vc1_mc.c
diff options
context:
space:
mode:
authorMichael Niedermayer2015-06-08 20:58:13 +0200
committerMichael Niedermayer2015-06-08 21:05:12 +0200
commitdb8ae37a783aba18d8f869dae1824a3e3f984bf8 (patch)
tree280cfe9fdd15922660e34052e0dce0e93ab335c5 /libavcodec/vc1_mc.c
parent34d278f9838e355b3b2c7a9c0f77d7fcaf37ce49 (diff)
parentda0c8664b4dc906696803685f7e53ade68594ab8 (diff)
Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'
* commit 'da0c8664b4dc906696803685f7e53ade68594ab8': mpegvideo: Move various temporary buffers to a separate context Conflicts: libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/rv34.c libavcodec/vc1_mc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1_mc.c')
-rw-r--r--libavcodec/vc1_mc.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c
index 1a78c178db..535824339e 100644
--- a/libavcodec/vc1_mc.c
+++ b/libavcodec/vc1_mc.c
@@ -271,25 +271,25 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
/* for grayscale we should not try to read from unknown area */
if (CONFIG_GRAY && 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 *ubuf = s->edge_emu_buffer + 19 * s->linesize;
+ uint8_t *ubuf = s->sc.edge_emu_buffer + 19 * s->linesize;
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
const int k = 17 + s->mspel * 2;
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,
k, k,
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(ubuf, srcU,
s->uvlinesize, s->uvlinesize,
8 + 1, 8 + 1,
@@ -467,12 +467,12 @@ void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
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,
k, k << 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) {
vc1_scale_luma(srcY, k, s->linesize << fieldmv);
@@ -602,16 +602,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) {
@@ -704,16 +704,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) {
@@ -802,24 +802,24 @@ void ff_vc1_interp_mc(VC1Context *v)
/* for grayscale we should not try to read from unknown area */
if (CONFIG_GRAY && 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 *ubuf = s->edge_emu_buffer + 19 * s->linesize;
+ uint8_t *ubuf = s->sc.edge_emu_buffer + 19 * s->linesize;
uint8_t *vbuf = ubuf + 9 * s->uvlinesize;
const int k = 17 + s->mspel * 2;
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,
k, k,
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(ubuf, srcU,
s->uvlinesize, s->uvlinesize,
8 + 1, 8 + 1,