Skip to content
Snippets Groups Projects
Commit b034f72b authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Add some const keywords in rtjpeg decoder

Originally committed as revision 11792 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7e5cdb5b
No related branches found
No related tags found
No related merge requests found
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
* aligned this could be done faster in a different way, e.g. as it is done * aligned this could be done faster in a different way, e.g. as it is done
* in MPlayer libmpcodecs/native/RTjpegN.c * in MPlayer libmpcodecs/native/RTjpegN.c
*/ */
static inline int get_block(GetBitContext *gb, DCTELEM *block, uint8_t *scan, static inline int get_block(GetBitContext *gb, DCTELEM *block, const uint8_t *scan,
uint32_t *quant) { const uint32_t *quant) {
int coeff, i, n; int coeff, i, n;
int8_t ac; int8_t ac;
uint8_t dc = get_bits(gb, 8); uint8_t dc = get_bits(gb, 8);
...@@ -97,7 +97,7 @@ static inline int get_block(GetBitContext *gb, DCTELEM *block, uint8_t *scan, ...@@ -97,7 +97,7 @@ static inline int get_block(GetBitContext *gb, DCTELEM *block, uint8_t *scan,
* \return number of bytes consumed from the input buffer * \return number of bytes consumed from the input buffer
*/ */
int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f,
uint8_t *buf, int buf_size) { const uint8_t *buf, int buf_size) {
DECLARE_ALIGNED_16(DCTELEM, block[64]); DECLARE_ALIGNED_16(DCTELEM, block[64]);
GetBitContext gb; GetBitContext gb;
int w = c->w / 16, h = c->h / 16; int w = c->w / 16, h = c->h / 16;
...@@ -147,7 +147,7 @@ int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, ...@@ -147,7 +147,7 @@ int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f,
*/ */
void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp,
int width, int height, int width, int height,
uint32_t *lquant, uint32_t *cquant) { const uint32_t *lquant, const uint32_t *cquant) {
int i; int i;
c->dsp = dsp; c->dsp = dsp;
for (i = 0; i < 64; i++) { for (i = 0; i < 64; i++) {
......
...@@ -35,8 +35,8 @@ typedef struct { ...@@ -35,8 +35,8 @@ typedef struct {
void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp, void rtjpeg_decode_init(RTJpegContext *c, DSPContext *dsp,
int width, int height, int width, int height,
uint32_t *lquant, uint32_t *cquant); const uint32_t *lquant, const uint32_t *cquant);
int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f,
uint8_t *buf, int buf_size); const uint8_t *buf, int buf_size);
#endif /* FFMPEG_RTJPEG_H */ #endif /* FFMPEG_RTJPEG_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment