aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2023-12-11 01:24:58 +0100
committerClément Bœsch <u@pkh.me>2024-01-10 14:08:00 +0100
commitd6e0fb7c928cf818d67a0b2af571c0b89d6f6704 (patch)
tree6b205383705130c13d10840bc2ab5c027facfe50 /libavcodec
parentcbee015867f26eea4aed8a23eba47f515ae329c0 (diff)
downloadffmpeg-d6e0fb7c928cf818d67a0b2af571c0b89d6f6704.tar.gz
avcodec/proresenc_kostya: simplify quantization matrix bytestream writing
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/proresenc_kostya.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index ae697bb55f..d29faa0fe3 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1013,12 +1013,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytestream_put_byte (&buf, 0); // reserved
if (ctx->quant_sel != QUANT_MAT_DEFAULT) {
bytestream_put_byte (&buf, 0x03); // matrix flags - both matrices are present
- // luma quantisation matrix
- for (i = 0; i < 64; i++)
- bytestream_put_byte(&buf, ctx->quant_mat[i]);
- // chroma quantisation matrix
- for (i = 0; i < 64; i++)
- bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);
+ bytestream_put_buffer(&buf, ctx->quant_mat, 64); // luma quantisation matrix
+ bytestream_put_buffer(&buf, ctx->quant_chroma_mat, 64); // chroma quantisation matrix
} else {
bytestream_put_byte (&buf, 0x00); // matrix flags - default matrices are used
}