| @@ -56,10 +56,10 @@ static int put_huffman_table(PutBitContext *p, int table_class, int table_id, · 55 unmodified lines |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p, |
| 59 | | − MJpegContext *m, |
| 59 | + const MJpegContext *m, |
| 60 | 60 | const uint8_t intra_matrix_permutation[64], |
| 61 | | − uint16_t luma_intra_matrix[64], |
| 62 | | − uint16_t chroma_intra_matrix[64], |
| 61 | + const uint16_t luma_intra_matrix[64], |
| 62 | + const uint16_t chroma_intra_matrix[64], |
| 63 | 63 | int hsample[3], int use_slices, int matrices_differ) |
| 64 | 64 | { |
| 65 | 65 | int size; |
| @@ -246,7 +246,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p, · 180 unmodified lines |
| 246 | 246 | } |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | | −void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4]) |
| 249 | +void ff_mjpeg_init_hvsample(const AVCodecContext *avctx, int hsample[4], int vsample[4]) |
| 250 | 250 | { |
| 251 | 251 | if (avctx->codec_id == AV_CODEC_ID_LJPEG && |
| 252 | 252 | ( avctx->pix_fmt == AV_PIX_FMT_BGR0 |
| @@ -273,10 +273,10 @@ void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4 · 20 unmodified lines |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, |
| 276 | | − const AVFrame *frame, struct MJpegContext *m, |
| 276 | + const AVFrame *frame, const struct MJpegContext *m, |
| 277 | 277 | const uint8_t intra_matrix_permutation[64], int pred, |
| 278 | | − uint16_t luma_intra_matrix[64], |
| 279 | | − uint16_t chroma_intra_matrix[64], |
| 278 | + const uint16_t luma_intra_matrix[64], |
| 279 | + const uint16_t chroma_intra_matrix[64], |
| 280 | 280 | int use_slices) |
| 281 | 281 | { |
| 282 | 282 | const int lossless = !m; |
| @@ -465,7 +465,7 @@ void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits) · 182 unmodified lines |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | void ff_mjpeg_encode_dc(PutBitContext *pb, int val, |
| 468 | | − uint8_t *huff_size, uint16_t *huff_code) |
| 468 | + const uint8_t huff_size[], const uint16_t huff_code[]) |
| 469 | 469 | { |
| 470 | 470 | int mant, nbits; |
| 471 | 471 | |