#include "get_bits.h"
#include "golomb.h"
#include "h264chroma.h"
+#include "idctdsp.h"
+#include "internal.h"
#include "mathops.h"
+#include "qpeldsp.h"
#include "cavs.h"
static const uint8_t alpha_tab[64] = {
}
#define SET_PARAMS \
- alpha = alpha_tab[av_clip(qp_avg + h->alpha_offset, 0, 63)]; \
- beta = beta_tab[av_clip(qp_avg + h->beta_offset, 0, 63)]; \
- tc = tc_tab[av_clip(qp_avg + h->alpha_offset, 0, 63)];
+ alpha = alpha_tab[av_clip_uintp2(qp_avg + h->alpha_offset, 6)]; \
+ beta = beta_tab[av_clip_uintp2(qp_avg + h->beta_offset, 6)]; \
+ tc = tc_tab[av_clip_uintp2(qp_avg + h->alpha_offset, 6)];
/**
* in-loop deblocking filter for a single macroblock
int x, y, ia;
int ih = 0;
int iv = 0;
- const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+ const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
for (x = 0; x < 4; x++) {
ih += (x + 1) * (top[5 + x] - top[3 - x]);
full_mx + 16 /* FIXME */ > pic_width + extra_width ||
full_my + 16 /* FIXME */ > pic_height + extra_height) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer,
- src_y - 2 - 2 * h->l_stride, h->l_stride,
+ src_y - 2 - 2 * h->l_stride,
+ h->l_stride, h->l_stride,
16 + 5, 16 + 5 /* FIXME */,
full_mx - 2, full_my - 2,
pic_width, pic_height);
if (emu) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cb,
- h->c_stride,
+ h->c_stride, h->c_stride,
9, 9 /* FIXME */,
mx >> 3, my >> 3,
pic_width >> 1, pic_height >> 1);
if (emu) {
h->vdsp.emulated_edge_mc(h->edge_emu_buffer, src_cr,
- h->c_stride,
+ h->c_stride, h->c_stride,
9, 9 /* FIXME */,
mx >> 3, my >> 3,
pic_width >> 1, pic_height >> 1);
{
int den = h->scale_den[src->ref];
- *d_x = (src->x * distp * den + 256 + (src->x >> 31)) >> 9;
- *d_y = (src->y * distp * den + 256 + (src->y >> 31)) >> 9;
+ *d_x = (src->x * distp * den + 256 + FF_SIGNBIT(src->x)) >> 9;
+ *d_y = (src->y * distp * den + 256 + FF_SIGNBIT(src->y)) >> 9;
}
static inline void mv_pred_median(AVSContext *h,
{
AVSContext *h = avctx->priv_data;
- ff_dsputil_init(&h->dsp, avctx);
+ ff_blockdsp_init(&h->bdsp, avctx);
ff_h264chroma_init(&h->h264chroma, 8);
+ ff_idctdsp_init(&h->idsp, avctx);
ff_videodsp_init(&h->vdsp, 8);
ff_cavsdsp_init(&h->cdsp, avctx);
- ff_init_scantable_permutation(h->dsp.idct_permutation,
+ ff_init_scantable_permutation(h->idsp.idct_permutation,
h->cdsp.idct_perm);
- ff_init_scantable(h->dsp.idct_permutation, &h->scantable, ff_zigzag_direct);
+ ff_init_scantable(h->idsp.idct_permutation, &h->scantable, ff_zigzag_direct);
h->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;