#include "get_bits.h"
#include "vp3data.h"
+#include "vp3dsp.h"
#include "xiph.h"
#include "thread.h"
AVFrame current_frame;
int keyframe;
DSPContext dsp;
+ VP3DSPContext vp3dsp;
int flipped_image;
int last_slice_end;
int skip_loop_filter;
{
/* do not perform left edge filter for left columns frags */
if (x > 0) {
- s->dsp.vp3_h_loop_filter(
+ s->vp3dsp.h_loop_filter(
plane_data + 8*x,
stride, bounding_values);
}
/* do not perform top edge filter for top row fragments */
if (y > 0) {
- s->dsp.vp3_v_loop_filter(
+ s->vp3dsp.v_loop_filter(
plane_data + 8*x,
stride, bounding_values);
}
* in this frame (it will be filtered in next iteration) */
if ((x < width - 1) &&
(s->all_fragments[fragment + 1].coding_method == MODE_COPY)) {
- s->dsp.vp3_h_loop_filter(
+ s->vp3dsp.h_loop_filter(
plane_data + 8*x + 8,
stride, bounding_values);
}
* in this frame (it will be filtered in the next row) */
if ((y < height - 1) &&
(s->all_fragments[fragment + width].coding_method == MODE_COPY)) {
- s->dsp.vp3_v_loop_filter(
+ s->vp3dsp.v_loop_filter(
plane_data + 8*x + 8*stride,
stride, bounding_values);
}
index = vp3_dequant(s, s->all_fragments + i, plane, 0, block);
if (index > 63)
continue;
- if(s->avctx->idct_algo!=FF_IDCT_VP3)
- block[0] += 128<<3;
- s->dsp.idct_put(
+ s->vp3dsp.idct_put(
output_plane + first_pixel,
stride,
block);
if (index > 63)
continue;
if (index > 0) {
- s->dsp.idct_add(
+ s->vp3dsp.idct_add(
output_plane + first_pixel,
stride,
block);
} else {
- s->dsp.vp3_idct_dc_add(output_plane + first_pixel, stride, block);
+ s->vp3dsp.idct_dc_add(output_plane + first_pixel, stride, block);
}
}
} else {
if (avctx->pix_fmt == PIX_FMT_NONE)
avctx->pix_fmt = PIX_FMT_YUV420P;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
- if(avctx->idct_algo==FF_IDCT_AUTO)
- avctx->idct_algo=FF_IDCT_VP3;
ff_dsputil_init(&s->dsp, avctx);
+ ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
+ ff_init_scantable_permutation(s->dsp.idct_permutation, s->vp3dsp.idct_perm);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
/* initialize to an impossible value which will force a recalculation