summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegenc_common.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-22 02:05:48 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 16:28:54 +0100
commitbd2ec3d3454f4fea8c4362faff993ee1ab7a30ff (patch)
tree7b697a30b55b59660a4c744d7cc98b0163b9f09c /libavcodec/mjpegenc_common.c
parent506758357e21f4500e160496734d1128c68a8983 (diff)
downloadffmpeg-bd2ec3d3454f4fea8c4362faff993ee1ab7a30ff.tar.gz
avcodec/mpegvideo: Move MJPEG/AMV-only fields to MJpegContext
This is possible now that MJpegContext is allocated jointly with MpegEncContext as part of the AVCodecContext's private data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mjpegenc_common.c')
-rw-r--r--libavcodec/mjpegenc_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index 049a8f4d25..5058fc9113 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -73,7 +73,7 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p,
int matrix_count = 1 + !!memcmp(luma_intra_matrix,
chroma_intra_matrix,
sizeof(luma_intra_matrix[0]) * 64);
- if (s && s->force_duplicated_matrix)
+ if (s && s->mjpeg_ctx->force_duplicated_matrix)
matrix_count = 2;
/* quant matrixes */
put_marker(p, DQT);
@@ -110,7 +110,7 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p,
// Only MJPEG can have a variable Huffman variable. All other
// formats use the default Huffman table.
- if (s && s->huffman == HUFFMAN_TABLE_OPTIMAL) {
+ if (s && s->mjpeg_ctx->huffman == HUFFMAN_TABLE_OPTIMAL) {
size += put_huffman_table(p, 0, 0, s->mjpeg_ctx->bits_dc_luminance,
s->mjpeg_ctx->val_dc_luminance);
size += put_huffman_table(p, 0, 1, s->mjpeg_ctx->bits_dc_chrominance,