|
@@ -56,10 +56,10 @@ static int put_huffman_table(PutBitContext *p, int table_class, int table_id,
|
|
|
}
|
|
|
|
|
|
static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p,
|
|
|
- MJpegContext *m,
|
|
|
+ const MJpegContext *m,
|
|
|
const uint8_t intra_matrix_permutation[64],
|
|
|
- uint16_t luma_intra_matrix[64],
|
|
|
- uint16_t chroma_intra_matrix[64],
|
|
|
+ const uint16_t luma_intra_matrix[64],
|
|
|
+ const uint16_t chroma_intra_matrix[64],
|
|
|
int hsample[3], int use_slices, int matrices_differ)
|
|
|
{
|
|
|
int size;
|
|
@@ -246,7 +246,7 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4])
|
|
|
+void ff_mjpeg_init_hvsample(const AVCodecContext *avctx, int hsample[4], int vsample[4])
|
|
|
{
|
|
|
if (avctx->codec_id == AV_CODEC_ID_LJPEG &&
|
|
|
( avctx->pix_fmt == AV_PIX_FMT_BGR0
|
|
@@ -273,10 +273,10 @@ void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4
|
|
|
}
|
|
|
|
|
|
void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
|
|
|
- const AVFrame *frame, struct MJpegContext *m,
|
|
|
+ const AVFrame *frame, const struct MJpegContext *m,
|
|
|
const uint8_t intra_matrix_permutation[64], int pred,
|
|
|
- uint16_t luma_intra_matrix[64],
|
|
|
- uint16_t chroma_intra_matrix[64],
|
|
|
+ const uint16_t luma_intra_matrix[64],
|
|
|
+ const uint16_t chroma_intra_matrix[64],
|
|
|
int use_slices)
|
|
|
{
|
|
|
const int lossless = !m;
|
|
@@ -465,7 +465,7 @@ void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits)
|
|
|
}
|
|
|
|
|
|
void ff_mjpeg_encode_dc(PutBitContext *pb, int val,
|
|
|
- uint8_t *huff_size, uint16_t *huff_code)
|
|
|
+ const uint8_t huff_size[], const uint16_t huff_code[])
|
|
|
{
|
|
|
int mant, nbits;
|
|
|
|