summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/proresdsp.c3
-rw-r--r--libavcodec/proresdsp.h2
-rw-r--r--libavcodec/proresenc_kostya.c11
3 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/proresdsp.c b/libavcodec/proresdsp.c
index 99f259b..f624633 100644
--- a/libavcodec/proresdsp.c
+++ b/libavcodec/proresdsp.c
@@ -86,8 +86,5 @@ av_cold void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
#endif
#if CONFIG_PRORES_KS_ENCODER
dsp->fdct = prores_fdct_c;
- dsp->dct_permutation_type = FF_NO_IDCT_PERM;
- ff_init_scantable_permutation(dsp->dct_permutation,
- dsp->dct_permutation_type);
#endif
}
diff --git a/libavcodec/proresdsp.h b/libavcodec/proresdsp.h
index 733d474..2b23f35 100644
--- a/libavcodec/proresdsp.h
+++ b/libavcodec/proresdsp.h
@@ -31,8 +31,6 @@
typedef struct ProresDSPContext {
int idct_permutation_type;
uint8_t idct_permutation[64];
- int dct_permutation_type;
- uint8_t dct_permutation[64];
void (* idct_put) (uint16_t *out, int linesize, int16_t *block, const int16_t *qmat);
void (* fdct) (const uint16_t *src, int linesize, int16_t *block);
} ProresDSPContext;
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 71c2cb4..aaeec0e 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -193,9 +193,9 @@ typedef struct ProresContext {
int16_t quants[MAX_STORED_Q][64];
int16_t custom_q[64];
const uint8_t *quant_mat;
+ const uint8_t *scantable;
ProresDSPContext dsp;
- ScanTable scantable;
int mb_width, mb_height;
int mbs_per_slice;
@@ -429,7 +429,7 @@ static int encode_slice_plane(ProresContext *ctx, PutBitContext *pb,
encode_dcs(pb, blocks, blocks_per_slice, qmat[0]);
encode_acs(pb, blocks, blocks_per_slice, plane_size_factor,
- ctx->scantable.permutated, qmat);
+ ctx->scantable, qmat);
flush_put_bits(pb);
return (put_bits_count(pb) - saved_pos) >> 3;
@@ -676,7 +676,7 @@ static int estimate_slice_plane(ProresContext *ctx, int *error, int plane,
bits = estimate_dcs(error, td->blocks[plane], blocks_per_slice, qmat[0]);
bits += estimate_acs(error, td->blocks[plane], blocks_per_slice,
- plane_size_factor, ctx->scantable.permutated, qmat);
+ plane_size_factor, ctx->scantable, qmat);
return FFALIGN(bits, 8);
}
@@ -1078,9 +1078,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
ff_proresdsp_init(&ctx->dsp, avctx);
- ff_init_scantable(ctx->dsp.dct_permutation, &ctx->scantable,
- interlaced ? ff_prores_interlaced_scan
- : ff_prores_progressive_scan);
+ ctx->scantable = interlaced ? ff_prores_interlaced_scan
+ : ff_prores_progressive_scan;
mps = ctx->mbs_per_slice;
if (mps & (mps - 1)) {
OpenPOWER on IntegriCloud