summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-01 14:38:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-01 15:22:11 +0200
commit581b5f0b9b93969712e73e0ae6324bbd03e85d4e (patch)
treed1319dc7744ac67e6ebd3379f11ff6e4a8178dc1 /libavcodec/vc1dec.c
parent909f53f2b285bc7dbe77d4690a03f3d114417297 (diff)
parente3fcb14347466095839c2a3c47ebecff02da891e (diff)
Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'
* commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c116
1 files changed, 69 insertions, 47 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 455896a21c..06deb7fad6 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -97,24 +97,24 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
fieldtx = v->fieldtx_plane[topleft_mb_pos];
stride_y = s->linesize << fieldtx;
v_dist = (16 - fieldtx) >> (fieldtx == 0);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][0],
- s->dest[0] - 16 * s->linesize - 16,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][1],
- s->dest[0] - 16 * s->linesize - 8,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][2],
- s->dest[0] - v_dist * s->linesize - 16,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][3],
- s->dest[0] - v_dist * s->linesize - 8,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][4],
- s->dest[1] - 8 * s->uvlinesize - 8,
- s->uvlinesize);
- s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][5],
- s->dest[2] - 8 * s->uvlinesize - 8,
- s->uvlinesize);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][0],
+ s->dest[0] - 16 * s->linesize - 16,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][1],
+ s->dest[0] - 16 * s->linesize - 8,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][2],
+ s->dest[0] - v_dist * s->linesize - 16,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][3],
+ s->dest[0] - v_dist * s->linesize - 8,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][4],
+ s->dest[1] - 8 * s->uvlinesize - 8,
+ s->uvlinesize);
+ s->idsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][5],
+ s->dest[2] - 8 * s->uvlinesize - 8,
+ s->uvlinesize);
}
if (s->mb_x == s->mb_width - 1) {
top_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x;
@@ -122,24 +122,24 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v)
fieldtx = v->fieldtx_plane[top_mb_pos];
stride_y = s->linesize << fieldtx;
v_dist = fieldtx ? 15 : 8;
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][0],
- s->dest[0] - 16 * s->linesize,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][1],
- s->dest[0] - 16 * s->linesize + 8,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][2],
- s->dest[0] - v_dist * s->linesize,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][3],
- s->dest[0] - v_dist * s->linesize + 8,
- stride_y);
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][4],
- s->dest[1] - 8 * s->uvlinesize,
- s->uvlinesize);
- s->dsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][5],
- s->dest[2] - 8 * s->uvlinesize,
- s->uvlinesize);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][0],
+ s->dest[0] - 16 * s->linesize,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][1],
+ s->dest[0] - 16 * s->linesize + 8,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][2],
+ s->dest[0] - v_dist * s->linesize,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][3],
+ s->dest[0] - v_dist * s->linesize + 8,
+ stride_y);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][4],
+ s->dest[1] - 8 * s->uvlinesize,
+ s->uvlinesize);
+ s->idsp.put_signed_pixels_clamped(v->block[v->top_blk_idx][5],
+ s->dest[2] - 8 * s->uvlinesize,
+ s->uvlinesize);
}
}
@@ -3277,7 +3277,7 @@ static int vc1_decode_p_block(VC1Context *v, int16_t block[64], int n,
v->vc1dsp.vc1_inv_trans_8x8_dc(dst, linesize, block);
else {
v->vc1dsp.vc1_inv_trans_8x8(block);
- s->dsp.add_pixels_clamped(block, dst, linesize);
+ s->idsp.add_pixels_clamped(block, dst, linesize);
}
}
break;
@@ -3608,7 +3608,10 @@ static int vc1_decode_p_mb(VC1Context *v)
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
s->block[i][j] <<= 1;
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ i & 4 ? s->uvlinesize
+ : s->linesize);
if (v->pq >= 9 && v->overlap) {
if (v->c_avail)
v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
@@ -3716,8 +3719,10 @@ static int vc1_decode_p_mb(VC1Context *v)
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
s->block[i][j] <<= 1;
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off,
- (i & 4) ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ (i & 4) ? s->uvlinesize
+ : s->linesize);
if (v->pq >= 9 && v->overlap) {
if (v->c_avail)
v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
@@ -3866,7 +3871,9 @@ static int vc1_decode_p_mb_intfr(VC1Context *v)
stride_y = s->uvlinesize;
off = 0;
}
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, stride_y);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ stride_y);
//TODO: loop filter
}
@@ -4028,7 +4035,10 @@ static int vc1_decode_p_mb_intfi(VC1Context *v)
continue;
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ (i & 4) ? s->uvlinesize
+ : s->linesize);
// TODO: loop filter
}
} else {
@@ -4230,7 +4240,10 @@ static void vc1_decode_b_mb(VC1Context *v)
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
s->block[i][j] <<= 1;
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ i & 4 ? s->uvlinesize
+ : s->linesize);
} else if (val) {
vc1_decode_p_block(v, s->block[i], i, mquant, ttmb,
first_block, s->dest[dst_idx] + off,
@@ -4302,7 +4315,10 @@ static void vc1_decode_b_mb_intfi(VC1Context *v)
for (j = 0; j < 64; j++)
s->block[i][j] <<= 1;
off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i & 4) ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ (i & 4) ? s->uvlinesize
+ : s->linesize);
// TODO: yet to perform loop filter
}
} else {
@@ -4528,7 +4544,9 @@ static int vc1_decode_b_mb_intfr(VC1Context *v)
stride_y = s->uvlinesize;
off = 0;
}
- s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, stride_y);
+ s->idsp.put_signed_pixels_clamped(s->block[i],
+ s->dest[dst_idx] + off,
+ stride_y);
}
} else {
s->mb_intra = v->is_intra[s->mb_x] = 0;
@@ -4832,12 +4850,16 @@ static void vc1_decode_i_blocks(VC1Context *v)
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
s->block[k][j] <<= 1;
- s->dsp.put_signed_pixels_clamped(s->block[k], dst[k], k & 4 ? s->uvlinesize : s->linesize);
+ s->idsp.put_signed_pixels_clamped(s->block[k], dst[k],
+ k & 4 ? s->uvlinesize
+ : s->linesize);
} else {
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
s->block[k][j] = (s->block[k][j] - 64) << 1;
- s->dsp.put_pixels_clamped(s->block[k], dst[k], k & 4 ? s->uvlinesize : s->linesize);
+ s->idsp.put_pixels_clamped(s->block[k], dst[k],
+ k & 4 ? s->uvlinesize
+ : s->linesize);
}
}