aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-17 19:35:03 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-17 19:35:03 +0100
commit9d4799c247e305ab480198e4942d229a2949ea9b (patch)
tree578dda879d68c9a03a5969bfd1c4e8334144e336
parent61400a1dc751c82cf6f33a7510c3804b7b201f25 (diff)
parent8dead2aaca4aa8b84b77b05745755afb56b7d37a (diff)
downloadffmpeg-9d4799c247e305ab480198e4942d229a2949ea9b.tar.gz
Merge commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a'
* commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a': Move const qualifier before type name Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r--libavcodec/aacpsy.c10
-rw-r--r--libavcodec/alacenc.c8
-rw-r--r--libavcodec/dnxhdenc.c4
-rw-r--r--libavcodec/intrax8.c12
-rw-r--r--libavcodec/libopenh264enc.c2
-rw-r--r--libavcodec/motion_est_template.c18
6 files changed, 27 insertions, 27 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 6dbec3c706..9644db17c3 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -891,7 +891,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 };
@@ -910,7 +910,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));
@@ -943,9 +943,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])
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index c80c887699..9ac35f1a14 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -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++)
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index e2ebeeb4e9..4f706b6b86 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -761,7 +761,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);
@@ -776,7 +776,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg,
for (i = 0; i < bh; ++i) {
for (j = 0; j < bw; ++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
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 927f0eb348..260b7eb95c 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -290,8 +290,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;
@@ -486,8 +486,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;
@@ -558,8 +558,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++) {
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 6850568ef6..24bc228ad9 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -85,7 +85,7 @@ static int libopenh264_to_ffmpeg_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 ffmpeg log level is
// less than or equal to the current ffmpeg log level.
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 9f6b2c26fc..ec5e6eda56 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -413,7 +413,7 @@ if( (y)>(ymax<<(S)) ) av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d ymax" #v, ymax,
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;
@@ -454,7 +454,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;
@@ -496,7 +496,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;
@@ -530,7 +530,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;
@@ -568,7 +568,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;
@@ -615,7 +615,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;
@@ -678,7 +678,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;
@@ -768,7 +768,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;
@@ -829,7 +829,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)