diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-06-14 11:59:58 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-06-14 12:04:15 +0200 |
commit | cfcd6e2108a7c43394840ca857ba1b6e8f6351c2 (patch) | |
tree | 206dcea0cbbf396ee71487a9067cb1fca9aca9ce /libavcodec | |
parent | d26ea03f60ac78476766bfcc115c0ec050c68198 (diff) | |
download | ffmpeg-cfcd6e2108a7c43394840ca857ba1b6e8f6351c2.tar.gz |
avcodec/proresdec2: remove duplicated function
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/proresdec2.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index 6445d948d9..b86614adc0 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -44,13 +44,6 @@ #include "proresdata.h" #include "thread.h" -static void permute(uint8_t *dst, const uint8_t *src, const uint8_t permutation[64]) -{ - int i; - for (i = 0; i < 64; i++) - dst[i] = permutation[src[i]]; -} - #define ALPHA_SHIFT_16_TO_10(alpha_val) (alpha_val >> 6) #define ALPHA_SHIFT_8_TO_10(alpha_val) ((alpha_val << 2) | (alpha_val >> 6)) #define ALPHA_SHIFT_16_TO_12(alpha_val) (alpha_val >> 4) @@ -187,8 +180,8 @@ static av_cold int decode_init(AVCodecContext *avctx) ff_init_scantable_permutation(idct_permutation, ctx->prodsp.idct_permutation_type); - permute(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation); - permute(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation); + ff_permute_scantable(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation); + ff_permute_scantable(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation); ctx->pix_fmt = AV_PIX_FMT_NONE; @@ -304,7 +297,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, av_log(avctx, AV_LOG_ERROR, "Header truncated\n"); return AVERROR_INVALIDDATA; } - permute(ctx->qmat_luma, ctx->prodsp.idct_permutation, ptr); + ff_permute_scantable(ctx->qmat_luma, ctx->prodsp.idct_permutation, ptr); ptr += 64; } else { memset(ctx->qmat_luma, 4, 64); @@ -315,7 +308,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, av_log(avctx, AV_LOG_ERROR, "Header truncated\n"); return AVERROR_INVALIDDATA; } - permute(ctx->qmat_chroma, ctx->prodsp.idct_permutation, ptr); + ff_permute_scantable(ctx->qmat_chroma, ctx->prodsp.idct_permutation, ptr); } else { memcpy(ctx->qmat_chroma, ctx->qmat_luma, 64); } |