Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -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 | |
| @@ -31,21 +31,21 @@ struct MJpegContext; · 30 unmodified lines | ||
| 31 | 31 | int ff_mjpeg_add_icc_profile_size(AVCodecContext *avctx, const AVFrame *frame, |
| 32 | 32 | size_t *max_pkt_size); |
| 33 | 33 | void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, |
| 34 | − const AVFrame *frame, struct MJpegContext *m, | |
| 34 | + const AVFrame *frame, const struct MJpegContext *m, | |
| 35 | 35 | const uint8_t intra_matrix_permutation[64], |
| 36 | 36 | int pred, |
| 37 | − uint16_t luma_intra_matrix[64], | |
| 38 | − uint16_t chroma_intra_matrix[64], | |
| 37 | + const uint16_t luma_intra_matrix[64], | |
| 38 | + const uint16_t chroma_intra_matrix[64], | |
| 39 | 39 | int use_slices); |
| 40 | 40 | void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits); |
| 41 | 41 | void ff_mjpeg_escape_FF(PutBitContext *pb, int start); |
| 42 | 42 | void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, |
| 43 | 43 | const uint8_t *bits_table, |
| 44 | 44 | const uint8_t *val_table); |
| 45 | −void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4]); | |
| 45 | +void ff_mjpeg_init_hvsample(const AVCodecContext *avctx, int hsample[4], int vsample[4]); | |
| 46 | 46 | |
| 47 | 47 | void ff_mjpeg_encode_dc(PutBitContext *pb, int val, |
| 48 | − uint8_t *huff_size, uint16_t *huff_code); | |
| 48 | + const uint8_t huff_size[], const uint16_t huff_code[]); | |
| 49 | 49 | |
| 50 | 50 | int ff_mjpeg_encode_check_pix_fmt(AVCodecContext *avctx); |
| 51 | 51 | |