aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-01-24 11:55:16 +0100
committerDiego Biurrun <diego@biurrun.de>2014-06-30 07:58:46 -0700
commite3fcb14347466095839c2a3c47ebecff02da891e (patch)
tree38fbcef2c592faae3610887dbda3ab333181d1dc /libavcodec/mpeg12dec.c
parentadcb8392c9b185fd8a91a95fa256d15ab1432a30 (diff)
downloadffmpeg-e3fcb14347466095839c2a3c47ebecff02da891e.tar.gz
dsputil: Split off IDCT bits into their own context
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 0bf3c20c37..aa98454d05 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -33,8 +33,8 @@
#include "avcodec.h"
#include "bytestream.h"
-#include "dsputil.h"
#include "error_resilience.h"
+#include "idctdsp.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpeg12.h"
@@ -1100,7 +1100,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
/* we need some permutation to store matrices,
* until MPV_common_init() sets the real permutation. */
for (i = 0; i < 64; i++)
- s2->dsp.idct_permutation[i] = i;
+ s2->idsp.idct_permutation[i] = i;
ff_MPV_decode_defaults(s2);
@@ -1309,15 +1309,15 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
/* Quantization matrices may need reordering
* if DCT permutation is changed. */
- memcpy(old_permutation, s->dsp.idct_permutation, 64 * sizeof(uint8_t));
+ memcpy(old_permutation, s->idsp.idct_permutation, 64 * sizeof(uint8_t));
if (ff_MPV_common_init(s) < 0)
return -2;
- quant_matrix_rebuild(s->intra_matrix, old_permutation, s->dsp.idct_permutation);
- quant_matrix_rebuild(s->inter_matrix, old_permutation, s->dsp.idct_permutation);
- quant_matrix_rebuild(s->chroma_intra_matrix, old_permutation, s->dsp.idct_permutation);
- quant_matrix_rebuild(s->chroma_inter_matrix, old_permutation, s->dsp.idct_permutation);
+ quant_matrix_rebuild(s->intra_matrix, old_permutation, s->idsp.idct_permutation);
+ quant_matrix_rebuild(s->inter_matrix, old_permutation, s->idsp.idct_permutation);
+ quant_matrix_rebuild(s->chroma_intra_matrix, old_permutation, s->idsp.idct_permutation);
+ quant_matrix_rebuild(s->chroma_inter_matrix, old_permutation, s->idsp.idct_permutation);
s1->mpeg_enc_ctx_allocated = 1;
}
@@ -1469,7 +1469,7 @@ static int load_matrix(MpegEncContext *s, uint16_t matrix0[64],
int i;
for (i = 0; i < 64; i++) {
- int j = s->dsp.idct_permutation[ff_zigzag_direct[i]];
+ int j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
int v = get_bits(&s->gb, 8);
if (v == 0) {
av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
@@ -1561,11 +1561,11 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1)
}
if (s->alternate_scan) {
- ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan);
- ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan);
+ ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan);
+ ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan);
} else {
- ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct);
- ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
+ ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct);
+ ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
}
/* composite display not parsed */
@@ -2070,7 +2070,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
load_matrix(s, s->chroma_intra_matrix, s->intra_matrix, 1);
} else {
for (i = 0; i < 64; i++) {
- j = s->dsp.idct_permutation[i];
+ j = s->idsp.idct_permutation[i];
v = ff_mpeg1_default_intra_matrix[i];
s->intra_matrix[j] = v;
s->chroma_intra_matrix[j] = v;
@@ -2080,7 +2080,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
load_matrix(s, s->chroma_inter_matrix, s->inter_matrix, 0);
} else {
for (i = 0; i < 64; i++) {
- int j = s->dsp.idct_permutation[i];
+ int j = s->idsp.idct_permutation[i];
v = ff_mpeg1_default_non_intra_matrix[i];
s->inter_matrix[j] = v;
s->chroma_inter_matrix[j] = v;
@@ -2142,7 +2142,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s1->mpeg_enc_ctx_allocated = 1;
for (i = 0; i < 64; i++) {
- int j = s->dsp.idct_permutation[i];
+ int j = s->idsp.idct_permutation[i];
v = ff_mpeg1_default_intra_matrix[i];
s->intra_matrix[j] = v;
s->chroma_intra_matrix[j] = v;