*/
/**
- * @file libavcodec/cavs.c
+ * @file
* Chinese AVS video (AVS1-P2, JiZhun profile) decoder
* @author Stefan Gehrer <stefan.gehrer@gmx.de>
*/
if(h->flags & A_AVAIL) {
qp_avg = (h->qp + h->left_qp + 1) >> 1;
SET_PARAMS;
- h->s.dsp.cavs_filter_lv(h->cy,h->l_stride,alpha,beta,tc,bs[0],bs[1]);
- h->s.dsp.cavs_filter_cv(h->cu,h->c_stride,alpha,beta,tc,bs[0],bs[1]);
- h->s.dsp.cavs_filter_cv(h->cv,h->c_stride,alpha,beta,tc,bs[0],bs[1]);
+ h->cdsp.cavs_filter_lv(h->cy,h->l_stride,alpha,beta,tc,bs[0],bs[1]);
+ h->cdsp.cavs_filter_cv(h->cu,h->c_stride,alpha,beta,tc,bs[0],bs[1]);
+ h->cdsp.cavs_filter_cv(h->cv,h->c_stride,alpha,beta,tc,bs[0],bs[1]);
}
qp_avg = h->qp;
SET_PARAMS;
- h->s.dsp.cavs_filter_lv(h->cy + 8,h->l_stride,alpha,beta,tc,bs[2],bs[3]);
- h->s.dsp.cavs_filter_lh(h->cy + 8*h->l_stride,h->l_stride,alpha,beta,tc,
+ h->cdsp.cavs_filter_lv(h->cy + 8,h->l_stride,alpha,beta,tc,bs[2],bs[3]);
+ h->cdsp.cavs_filter_lh(h->cy + 8*h->l_stride,h->l_stride,alpha,beta,tc,
bs[6],bs[7]);
if(h->flags & B_AVAIL) {
qp_avg = (h->qp + h->top_qp[h->mbx] + 1) >> 1;
SET_PARAMS;
- h->s.dsp.cavs_filter_lh(h->cy,h->l_stride,alpha,beta,tc,bs[4],bs[5]);
- h->s.dsp.cavs_filter_ch(h->cu,h->c_stride,alpha,beta,tc,bs[4],bs[5]);
- h->s.dsp.cavs_filter_ch(h->cv,h->c_stride,alpha,beta,tc,bs[4],bs[5]);
+ h->cdsp.cavs_filter_lh(h->cy,h->l_stride,alpha,beta,tc,bs[4],bs[5]);
+ h->cdsp.cavs_filter_ch(h->cu,h->c_stride,alpha,beta,tc,bs[4],bs[5]);
+ h->cdsp.cavs_filter_ch(h->cv,h->c_stride,alpha,beta,tc,bs[4],bs[5]);
}
}
}
void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type) {
if(ff_cavs_partition_flags[mb_type] == 0){ // 16x16
mc_part_std(h, 1, 8, 0, h->cy, h->cu, h->cv, 0, 0,
- h->s.dsp.put_cavs_qpel_pixels_tab[0],
+ h->cdsp.put_cavs_qpel_pixels_tab[0],
h->s.dsp.put_h264_chroma_pixels_tab[0],
- h->s.dsp.avg_cavs_qpel_pixels_tab[0],
+ h->cdsp.avg_cavs_qpel_pixels_tab[0],
h->s.dsp.avg_h264_chroma_pixels_tab[0],&h->mv[MV_FWD_X0]);
}else{
mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 0,
- h->s.dsp.put_cavs_qpel_pixels_tab[1],
+ h->cdsp.put_cavs_qpel_pixels_tab[1],
h->s.dsp.put_h264_chroma_pixels_tab[1],
- h->s.dsp.avg_cavs_qpel_pixels_tab[1],
+ h->cdsp.avg_cavs_qpel_pixels_tab[1],
h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X0]);
mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 4, 0,
- h->s.dsp.put_cavs_qpel_pixels_tab[1],
+ h->cdsp.put_cavs_qpel_pixels_tab[1],
h->s.dsp.put_h264_chroma_pixels_tab[1],
- h->s.dsp.avg_cavs_qpel_pixels_tab[1],
+ h->cdsp.avg_cavs_qpel_pixels_tab[1],
h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X1]);
mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 4,
- h->s.dsp.put_cavs_qpel_pixels_tab[1],
+ h->cdsp.put_cavs_qpel_pixels_tab[1],
h->s.dsp.put_h264_chroma_pixels_tab[1],
- h->s.dsp.avg_cavs_qpel_pixels_tab[1],
+ h->cdsp.avg_cavs_qpel_pixels_tab[1],
h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X2]);
mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 4, 4,
- h->s.dsp.put_cavs_qpel_pixels_tab[1],
+ h->cdsp.put_cavs_qpel_pixels_tab[1],
h->s.dsp.put_h264_chroma_pixels_tab[1],
- h->s.dsp.avg_cavs_qpel_pixels_tab[1],
+ h->cdsp.avg_cavs_qpel_pixels_tab[1],
h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X3]);
}
}
/**
* save predictors for later macroblocks and increase
* macroblock address
- * @returns 0 if end of frame is reached, 1 otherwise
+ * @return 0 if end of frame is reached, 1 otherwise
*/
int ff_cavs_next_mb(AVSContext *h) {
int i;
MpegEncContext * const s = &h->s;
MPV_decode_defaults(s);
+ ff_cavsdsp_init(&h->cdsp, avctx);
s->avctx = avctx;
avctx->pix_fmt= PIX_FMT_YUV420P;