You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mpegvideoenc: Constify vlc length pointees
These pointers point to static tables which must not be modified by anyone after they have been initialized. So constify the pointees. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -758,7 +758,7 @@ static int rd8x8_c(MPVEncContext *const s, const uint8_t *src1, const uint8_t *s
|
||||
LOCAL_ALIGNED_16(uint8_t, lsrc2, [64]);
|
||||
int i, last, run, bits, level, distortion, start_i;
|
||||
const int esc_length = s->ac_esc_length;
|
||||
uint8_t *length, *last_length;
|
||||
const uint8_t *length, *last_length;
|
||||
|
||||
copy_block8(lsrc1, src1, 8, stride, 8);
|
||||
copy_block8(lsrc2, src2, 8, stride, 8);
|
||||
@ -831,7 +831,7 @@ static int bit8x8_c(MPVEncContext *const s, const uint8_t *src1, const uint8_t *
|
||||
LOCAL_ALIGNED_16(int16_t, temp, [64]);
|
||||
int i, last, run, bits, level, start_i;
|
||||
const int esc_length = s->ac_esc_length;
|
||||
uint8_t *length, *last_length;
|
||||
const uint8_t *length, *last_length;
|
||||
|
||||
s->pdsp.diff_pixels_unaligned(temp, src1, src2, stride);
|
||||
|
||||
|
@ -93,13 +93,13 @@ typedef struct MPVEncContext {
|
||||
int min_qcoeff; ///< minimum encodable coefficient
|
||||
int max_qcoeff; ///< maximum encodable coefficient
|
||||
int ac_esc_length; ///< num of bits needed to encode the longest esc
|
||||
uint8_t *intra_ac_vlc_length;
|
||||
uint8_t *intra_ac_vlc_last_length;
|
||||
uint8_t *intra_chroma_ac_vlc_length;
|
||||
uint8_t *intra_chroma_ac_vlc_last_length;
|
||||
uint8_t *inter_ac_vlc_length;
|
||||
uint8_t *inter_ac_vlc_last_length;
|
||||
uint8_t *luma_dc_vlc_length;
|
||||
const uint8_t *intra_ac_vlc_length;
|
||||
const uint8_t *intra_ac_vlc_last_length;
|
||||
const uint8_t *intra_chroma_ac_vlc_length;
|
||||
const uint8_t *intra_chroma_ac_vlc_last_length;
|
||||
const uint8_t *inter_ac_vlc_length;
|
||||
const uint8_t *inter_ac_vlc_last_length;
|
||||
const uint8_t *luma_dc_vlc_length;
|
||||
|
||||
int coded_score[12];
|
||||
|
||||
|
Reference in New Issue
Block a user