diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-18 22:27:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-18 22:34:48 +0200 |
commit | 204c4e953d895e15ab0908d715fd46181bf32add (patch) | |
tree | aebdffe23aa1133eeb1db55b810135ecdfe1c188 /libavcodec/vp3.c | |
parent | c66978e29ad9cae2c71da83857c6a3cec11bb9cb (diff) | |
parent | ffdd93a25e64db82c053577f415ea82c54fd5235 (diff) | |
download | ffmpeg-streaming-204c4e953d895e15ab0908d715fd46181bf32add.zip ffmpeg-streaming-204c4e953d895e15ab0908d715fd46181bf32add.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ppc: fix build with altivec disabled
vp3: move idct and loop filter pointers to new vp3dsp context
build: add CONFIG_VP3DSP, reduce repetition in OBJS lists
tscc2: do not add/subtract 128 bias during DCT
tscc2: fix typo in DCT
configure: clarify external library section of help output
configure: mark libfdk-aac as nonfree
configure: cosmetics: drop some unnecessary backslashes
os_support: K&R formatting cosmetics
Conflicts:
configure
libavcodec/vp3.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 81f6b89..a3bfd74 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -40,6 +40,7 @@ #include "get_bits.h" #include "vp3data.h" +#include "vp3dsp.h" #include "xiph.h" #include "thread.h" @@ -135,6 +136,7 @@ typedef struct Vp3DecodeContext { AVFrame current_frame; int keyframe; DSPContext dsp; + VP3DSPContext vp3dsp; int flipped_image; int last_slice_end; int skip_loop_filter; @@ -1302,14 +1304,14 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane, int ystart, int ye { /* 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); } @@ -1319,7 +1321,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane, int ystart, int ye * 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); } @@ -1329,7 +1331,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane, int ystart, int ye * 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); } @@ -1574,20 +1576,18 @@ static void render_slice(Vp3DecodeContext *s, int slice) if (s->all_fragments[i].coding_method == MODE_INTRA) { vp3_dequant(s, s->all_fragments + i, plane, 0, block); - 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); } else { if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) { - 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 { @@ -1670,10 +1670,10 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) if (avctx->codec_id != CODEC_ID_THEORA) 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 |