typedef struct BinkContext {
AVCodecContext *avctx;
BlockDSPContext bdsp;
- HpelDSPContext hdsp;
+ op_pixels_func put_pixels_tab;
BinkDSPContext binkdsp;
AVFrame *last;
int version; ///< internal Bink file version
if (ref < ref_start || ref + 8*stride > ref_end) {
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
- c->hdsp.put_pixels_tab[1][0](dst, ref, stride, 8);
+ c->put_pixels_tab(dst, ref, stride, 8);
} else {
put_pixels8x8_overlapped(dst, ref, stride);
}
if (ref < ref_start || ref + 8 * stride > ref_end) {
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
- c->hdsp.put_pixels_tab[1][0](dst, ref, stride, 8);
+ c->put_pixels_tab(dst, ref, stride, 8);
} else {
put_pixels8x8_overlapped(dst, ref, stride);
}
if (ref < ref_start || ref + 8 * stride > ref_end) {
av_log(c->avctx, AV_LOG_WARNING, "Reference block is out of bounds\n");
} else if (ref + 8*stride < dst || ref >= dst + 8*stride) {
- c->hdsp.put_pixels_tab[1][0](dst, ref, stride, 8);
+ c->put_pixels_tab(dst, ref, stride, 8);
} else {
put_pixels8x8_overlapped(dst, ref, stride);
}
xoff, yoff);
return AVERROR_INVALIDDATA;
}
- c->hdsp.put_pixels_tab[1][0](dst, ref, stride, 8);
+ c->put_pixels_tab(dst, ref, stride, 8);
return 0;
}
}
switch (blk) {
case SKIP_BLOCK:
- c->hdsp.put_pixels_tab[1][0](dst, prev, stride, 8);
+ c->put_pixels_tab(dst, prev, stride, 8);
break;
case SCALED_BLOCK:
blk = get_value(c, BINK_SRC_SUB_BLOCK_TYPES);
BinkContext * const c = avctx->priv_data;
static VLC_TYPE table[16 * 128][2];
static int binkb_initialised = 0;
+ HpelDSPContext hdsp;
int i, ret;
int flags;
avctx->color_range = c->version == 'k' ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
ff_blockdsp_init(&c->bdsp, avctx);
- ff_hpeldsp_init(&c->hdsp, avctx->flags);
+ ff_hpeldsp_init(&hdsp, avctx->flags);
+ c->put_pixels_tab = hdsp.put_pixels_tab[1][0];
ff_binkdsp_init(&c->binkdsp);
if ((ret = init_bundles(c)) < 0)