These pointers point to static tables which must not be modified by anyone after they have been initialized. So constify the pointees.
Unified · Split
| @@ -758,7 +758,7 @@ static int rd8x8_c(MPVEncContext *const s, const uint8_t *src1, const uint8_t *s · 757 unmodified lines | ||
| 758 | 758 | LOCAL_ALIGNED_16(uint8_t, lsrc2, [64]); |
| 759 | 759 | int i, last, run, bits, level, distortion, start_i; |
| 760 | 760 | const int esc_length = s->ac_esc_length; |
| 761 | − uint8_t *length, *last_length; | |
| 761 | + const uint8_t *length, *last_length; | |
| 762 | 762 | |
| 763 | 763 | copy_block8(lsrc1, src1, 8, stride, 8); |
| 764 | 764 | 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 * · 66 unmodified lines | ||
| 831 | 831 | LOCAL_ALIGNED_16(int16_t, temp, [64]); |
| 832 | 832 | int i, last, run, bits, level, start_i; |
| 833 | 833 | const int esc_length = s->ac_esc_length; |
| 834 | − uint8_t *length, *last_length; | |
| 834 | + const uint8_t *length, *last_length; | |
| 835 | 835 | |
| 836 | 836 | s->pdsp.diff_pixels_unaligned(temp, src1, src2, stride); |
| 837 | 837 | |
| @@ -93,13 +93,13 @@ typedef struct MPVEncContext { · 92 unmodified lines | ||
| 93 | 93 | int min_qcoeff; ///< minimum encodable coefficient |
| 94 | 94 | int max_qcoeff; ///< maximum encodable coefficient |
| 95 | 95 | int ac_esc_length; ///< num of bits needed to encode the longest esc |
| 96 | − uint8_t *intra_ac_vlc_length; | |
| 97 | − uint8_t *intra_ac_vlc_last_length; | |
| 98 | − uint8_t *intra_chroma_ac_vlc_length; | |
| 99 | − uint8_t *intra_chroma_ac_vlc_last_length; | |
| 100 | − uint8_t *inter_ac_vlc_length; | |
| 101 | − uint8_t *inter_ac_vlc_last_length; | |
| 102 | − uint8_t *luma_dc_vlc_length; | |
| 96 | + const uint8_t *intra_ac_vlc_length; | |
| 97 | + const uint8_t *intra_ac_vlc_last_length; | |
| 98 | + const uint8_t *intra_chroma_ac_vlc_length; | |
| 99 | + const uint8_t *intra_chroma_ac_vlc_last_length; | |
| 100 | + const uint8_t *inter_ac_vlc_length; | |
| 101 | + const uint8_t *inter_ac_vlc_last_length; | |
| 102 | + const uint8_t *luma_dc_vlc_length; | |
| 103 | 103 | |
| 104 | 104 | int coded_score[12]; |
| 105 | 105 | |