Move const qualifier before type name

This commit is contained in:
Diego Biurrun 2016-03-22 15:33:28 +01:00
parent d909f43b5c
commit 8dead2aaca
7 changed files with 28 additions and 28 deletions

View File

@ -796,7 +796,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
if (la) {
float hpfsmpl[AAC_BLOCK_SIZE_LONG];
float const *pf = hpfsmpl;
const float *pf = hpfsmpl;
float attack_intensity[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS];
float energy_subshort[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS];
float energy_short[AAC_NUM_BLOCKS_SHORT + 1] = { 0 };
@ -826,7 +826,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
}
for (i = 0; i < AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS; i++) {
float const *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS);
const float *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS);
float p = 1.0f;
for (; pf < pfe; pf++)
p = FFMAX(p, fabsf(*pf));
@ -859,9 +859,9 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
/* GB: tuned (1) to avoid too many short blocks for test sample TRUMPET */
/* RH: tuned (2) to let enough short blocks through for test sample FSOL and SNAPS */
for (i = 1; i < AAC_NUM_BLOCKS_SHORT + 1; i++) {
float const u = energy_short[i - 1];
float const v = energy_short[i];
float const m = FFMAX(u, v);
const float u = energy_short[i - 1];
const float v = energy_short[i];
const float m = FFMAX(u, v);
if (m < 40000) { /* (2) */
if (u < 1.7f * v && v < 1.7f * u) { /* (1) */
if (i == 1 && attacks[0] < attacks[i])

View File

@ -81,7 +81,7 @@ typedef struct AlacEncodeContext {
static void init_sample_buffers(AlacEncodeContext *s, int channels,
uint8_t const *samples[2])
const uint8_t *samples[2])
{
int ch, i;
int shift = av_get_bytes_per_sample(s->avctx->sample_fmt) * 8 -
@ -364,7 +364,7 @@ static void write_element(AlacEncodeContext *s,
enum AlacRawDataBlockType element, int instance,
const uint8_t *samples0, const uint8_t *samples1)
{
uint8_t const *samples[2] = { samples0, samples1 };
const uint8_t *samples[2] = { samples0, samples1 };
int i, j, channels;
int prediction_type = 0;
PutBitContext *pb = &s->pbctx;
@ -376,14 +376,14 @@ static void write_element(AlacEncodeContext *s,
/* samples are channel-interleaved in verbatim mode */
if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P) {
int shift = 32 - s->avctx->bits_per_raw_sample;
int32_t const *samples_s32[2] = { (const int32_t *)samples0,
const int32_t *samples_s32[2] = { (const int32_t *)samples0,
(const int32_t *)samples1 };
for (i = 0; i < s->frame_size; i++)
for (j = 0; j < channels; j++)
put_sbits(pb, s->avctx->bits_per_raw_sample,
samples_s32[j][i] >> shift);
} else {
int16_t const *samples_s16[2] = { (const int16_t *)samples0,
const int16_t *samples_s16[2] = { (const int16_t *)samples0,
(const int16_t *)samples1 };
for (i = 0; i < s->frame_size; i++)
for (j = 0; j < channels; j++)

View File

@ -751,7 +751,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
ctx->mb_cmp[mb].mb = mb;
}
} else { // 10-bit
int const linesize = ctx->m.linesize >> 1;
const int linesize = ctx->m.linesize >> 1;
for (mb_x = 0; mb_x < ctx->m.mb_width; ++mb_x) {
uint16_t *pix = (uint16_t *)ctx->thread[0]->src[0] +
((mb_y << 4) * linesize) + (mb_x << 4);
@ -764,7 +764,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
for (i = 0; i < 16; ++i) {
for (j = 0; j < 16; ++j) {
// Turn 16-bit pixels into 10-bit ones.
int const sample = (unsigned) pix[j] >> 6;
const int sample = (unsigned) pix[j] >> 6;
sum += sample;
sqsum += sample * sample;
// 2^10 * 2^10 * 16 * 16 = 2^28, which is less than INT_MAX

View File

@ -289,8 +289,8 @@ static const uint8_t dc_index_offset[] = {
0, 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
};
static int x8_get_dc_rlf(IntraX8Context *const w,
int const mode, int *const level, int *const final)
static int x8_get_dc_rlf(IntraX8Context *const w, const int mode,
int *const level, int *const final)
{
MpegEncContext *const s = w->s;
int i, e, c;
@ -487,8 +487,8 @@ static void x8_get_prediction(IntraX8Context *const w)
*/
}
static void x8_ac_compensation(IntraX8Context *const w, int const direction,
int const dc_level)
static void x8_ac_compensation(IntraX8Context *const w, const int direction,
const int dc_level)
{
MpegEncContext *const s = w->s;
int t;
@ -559,8 +559,8 @@ static void x8_ac_compensation(IntraX8Context *const w, int const direction,
#undef T
}
static void dsp_x8_put_solidcolor(uint8_t const pix, uint8_t *dst,
int const linesize)
static void dsp_x8_put_solidcolor(const uint8_t pix, uint8_t *dst,
const int linesize)
{
int k;
for (k = 0; k < 8; k++) {

View File

@ -85,7 +85,7 @@ static int libopenh264_to_libav_log_level(int libopenh264_log_level)
//
// typedef void (*WelsTraceCallback) (void* ctx, int level, const char* string);
static void libopenh264_trace_callback(void *ctx, int level, char const *msg)
static void libopenh264_trace_callback(void *ctx, int level, const char *msg)
{
// The message will be logged only if the requested EQUIVALENT libav log level is
// less than or equal to the current libav log level.

View File

@ -416,7 +416,7 @@ if( (y)>(ymax<<(S)) ) printf("%d %d %d %d %d ymax" #v, ymax, (x), (y), s->mb_x,
const int shift= 1+qpel;\
static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -457,7 +457,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best,
}
static int funny_diamond_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -499,7 +499,7 @@ static int funny_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static int hex_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags, int dia_size)
{
MotionEstContext * const c= &s->me;
@ -533,7 +533,7 @@ static int hex_search(MpegEncContext * s, int *best, int dmin,
}
static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -571,7 +571,7 @@ static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,
}
static int umh_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -618,7 +618,7 @@ static int umh_search(MpegEncContext * s, int *best, int dmin,
}
static int full_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -681,7 +681,7 @@ static int full_search(MpegEncContext * s, int *best, int dmin,
#define MAX_SAB_SIZE ME_MAP_SIZE
static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -769,7 +769,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags)
{
MotionEstContext * const c= &s->me;
@ -830,7 +830,7 @@ static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
}
static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin,
int src_index, int ref_index, int const penalty_factor,
int src_index, int ref_index, const int penalty_factor,
int size, int h, int flags){
MotionEstContext * const c= &s->me;
if(c->dia_size==-1)

View File

@ -81,7 +81,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
bytes_per_scanline;
uint8_t *ptr;
const uint8_t *buf_end = buf + buf_size;
uint8_t const *bufstart = buf;
const uint8_t *bufstart = buf;
uint8_t *scanline;
int ret = -1;