... | ... |
@@ -796,7 +796,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio, |
796 | 796 |
|
797 | 797 |
if (la) { |
798 | 798 |
float hpfsmpl[AAC_BLOCK_SIZE_LONG]; |
799 |
- float const *pf = hpfsmpl; |
|
799 |
+ const float *pf = hpfsmpl; |
|
800 | 800 |
float attack_intensity[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS]; |
801 | 801 |
float energy_subshort[(AAC_NUM_BLOCKS_SHORT + 1) * PSY_LAME_NUM_SUBBLOCKS]; |
802 | 802 |
float energy_short[AAC_NUM_BLOCKS_SHORT + 1] = { 0 }; |
... | ... |
@@ -826,7 +826,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio, |
826 | 826 |
} |
827 | 827 |
|
828 | 828 |
for (i = 0; i < AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS; i++) { |
829 |
- float const *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS); |
|
829 |
+ const float *const pfe = pf + AAC_BLOCK_SIZE_LONG / (AAC_NUM_BLOCKS_SHORT * PSY_LAME_NUM_SUBBLOCKS); |
|
830 | 830 |
float p = 1.0f; |
831 | 831 |
for (; pf < pfe; pf++) |
832 | 832 |
p = FFMAX(p, fabsf(*pf)); |
... | ... |
@@ -859,9 +859,9 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio, |
859 | 859 |
/* GB: tuned (1) to avoid too many short blocks for test sample TRUMPET */ |
860 | 860 |
/* RH: tuned (2) to let enough short blocks through for test sample FSOL and SNAPS */ |
861 | 861 |
for (i = 1; i < AAC_NUM_BLOCKS_SHORT + 1; i++) { |
862 |
- float const u = energy_short[i - 1]; |
|
863 |
- float const v = energy_short[i]; |
|
864 |
- float const m = FFMAX(u, v); |
|
862 |
+ const float u = energy_short[i - 1]; |
|
863 |
+ const float v = energy_short[i]; |
|
864 |
+ const float m = FFMAX(u, v); |
|
865 | 865 |
if (m < 40000) { /* (2) */ |
866 | 866 |
if (u < 1.7f * v && v < 1.7f * u) { /* (1) */ |
867 | 867 |
if (i == 1 && attacks[0] < attacks[i]) |
... | ... |
@@ -81,7 +81,7 @@ typedef struct AlacEncodeContext { |
81 | 81 |
|
82 | 82 |
|
83 | 83 |
static void init_sample_buffers(AlacEncodeContext *s, int channels, |
84 |
- uint8_t const *samples[2]) |
|
84 |
+ const uint8_t *samples[2]) |
|
85 | 85 |
{ |
86 | 86 |
int ch, i; |
87 | 87 |
int shift = av_get_bytes_per_sample(s->avctx->sample_fmt) * 8 - |
... | ... |
@@ -364,7 +364,7 @@ static void write_element(AlacEncodeContext *s, |
364 | 364 |
enum AlacRawDataBlockType element, int instance, |
365 | 365 |
const uint8_t *samples0, const uint8_t *samples1) |
366 | 366 |
{ |
367 |
- uint8_t const *samples[2] = { samples0, samples1 }; |
|
367 |
+ const uint8_t *samples[2] = { samples0, samples1 }; |
|
368 | 368 |
int i, j, channels; |
369 | 369 |
int prediction_type = 0; |
370 | 370 |
PutBitContext *pb = &s->pbctx; |
... | ... |
@@ -376,14 +376,14 @@ static void write_element(AlacEncodeContext *s, |
376 | 376 |
/* samples are channel-interleaved in verbatim mode */ |
377 | 377 |
if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P) { |
378 | 378 |
int shift = 32 - s->avctx->bits_per_raw_sample; |
379 |
- int32_t const *samples_s32[2] = { (const int32_t *)samples0, |
|
379 |
+ const int32_t *samples_s32[2] = { (const int32_t *)samples0, |
|
380 | 380 |
(const int32_t *)samples1 }; |
381 | 381 |
for (i = 0; i < s->frame_size; i++) |
382 | 382 |
for (j = 0; j < channels; j++) |
383 | 383 |
put_sbits(pb, s->avctx->bits_per_raw_sample, |
384 | 384 |
samples_s32[j][i] >> shift); |
385 | 385 |
} else { |
386 |
- int16_t const *samples_s16[2] = { (const int16_t *)samples0, |
|
386 |
+ const int16_t *samples_s16[2] = { (const int16_t *)samples0, |
|
387 | 387 |
(const int16_t *)samples1 }; |
388 | 388 |
for (i = 0; i < s->frame_size; i++) |
389 | 389 |
for (j = 0; j < channels; j++) |
... | ... |
@@ -751,7 +751,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg, |
751 | 751 |
ctx->mb_cmp[mb].mb = mb; |
752 | 752 |
} |
753 | 753 |
} else { // 10-bit |
754 |
- int const linesize = ctx->m.linesize >> 1; |
|
754 |
+ const int linesize = ctx->m.linesize >> 1; |
|
755 | 755 |
for (mb_x = 0; mb_x < ctx->m.mb_width; ++mb_x) { |
756 | 756 |
uint16_t *pix = (uint16_t *)ctx->thread[0]->src[0] + |
757 | 757 |
((mb_y << 4) * linesize) + (mb_x << 4); |
... | ... |
@@ -764,7 +764,7 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg, |
764 | 764 |
for (i = 0; i < 16; ++i) { |
765 | 765 |
for (j = 0; j < 16; ++j) { |
766 | 766 |
// Turn 16-bit pixels into 10-bit ones. |
767 |
- int const sample = (unsigned) pix[j] >> 6; |
|
767 |
+ const int sample = (unsigned) pix[j] >> 6; |
|
768 | 768 |
sum += sample; |
769 | 769 |
sqsum += sample * sample; |
770 | 770 |
// 2^10 * 2^10 * 16 * 16 = 2^28, which is less than INT_MAX |
... | ... |
@@ -289,8 +289,8 @@ static const uint8_t dc_index_offset[] = { |
289 | 289 |
0, 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, |
290 | 290 |
}; |
291 | 291 |
|
292 |
-static int x8_get_dc_rlf(IntraX8Context *const w, |
|
293 |
- int const mode, int *const level, int *const final) |
|
292 |
+static int x8_get_dc_rlf(IntraX8Context *const w, const int mode, |
|
293 |
+ int *const level, int *const final) |
|
294 | 294 |
{ |
295 | 295 |
MpegEncContext *const s = w->s; |
296 | 296 |
int i, e, c; |
... | ... |
@@ -487,8 +487,8 @@ static void x8_get_prediction(IntraX8Context *const w) |
487 | 487 |
*/ |
488 | 488 |
} |
489 | 489 |
|
490 |
-static void x8_ac_compensation(IntraX8Context *const w, int const direction, |
|
491 |
- int const dc_level) |
|
490 |
+static void x8_ac_compensation(IntraX8Context *const w, const int direction, |
|
491 |
+ const int dc_level) |
|
492 | 492 |
{ |
493 | 493 |
MpegEncContext *const s = w->s; |
494 | 494 |
int t; |
... | ... |
@@ -559,8 +559,8 @@ static void x8_ac_compensation(IntraX8Context *const w, int const direction, |
559 | 559 |
#undef T |
560 | 560 |
} |
561 | 561 |
|
562 |
-static void dsp_x8_put_solidcolor(uint8_t const pix, uint8_t *dst, |
|
563 |
- int const linesize) |
|
562 |
+static void dsp_x8_put_solidcolor(const uint8_t pix, uint8_t *dst, |
|
563 |
+ const int linesize) |
|
564 | 564 |
{ |
565 | 565 |
int k; |
566 | 566 |
for (k = 0; k < 8; k++) { |
... | ... |
@@ -85,7 +85,7 @@ static int libopenh264_to_libav_log_level(int libopenh264_log_level) |
85 | 85 |
// |
86 | 86 |
// typedef void (*WelsTraceCallback) (void* ctx, int level, const char* string); |
87 | 87 |
|
88 |
-static void libopenh264_trace_callback(void *ctx, int level, char const *msg) |
|
88 |
+static void libopenh264_trace_callback(void *ctx, int level, const char *msg) |
|
89 | 89 |
{ |
90 | 90 |
// The message will be logged only if the requested EQUIVALENT libav log level is |
91 | 91 |
// less than or equal to the current libav log level. |
... | ... |
@@ -416,7 +416,7 @@ if( (y)>(ymax<<(S)) ) printf("%d %d %d %d %d ymax" #v, ymax, (x), (y), s->mb_x, |
416 | 416 |
const int shift= 1+qpel;\ |
417 | 417 |
|
418 | 418 |
static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, int dmin, |
419 |
- int src_index, int ref_index, int const penalty_factor, |
|
419 |
+ int src_index, int ref_index, const int penalty_factor, |
|
420 | 420 |
int size, int h, int flags) |
421 | 421 |
{ |
422 | 422 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -457,7 +457,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, |
457 | 457 |
} |
458 | 458 |
|
459 | 459 |
static int funny_diamond_search(MpegEncContext * s, int *best, int dmin, |
460 |
- int src_index, int ref_index, int const penalty_factor, |
|
460 |
+ int src_index, int ref_index, const int penalty_factor, |
|
461 | 461 |
int size, int h, int flags) |
462 | 462 |
{ |
463 | 463 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -499,7 +499,7 @@ static int funny_diamond_search(MpegEncContext * s, int *best, int dmin, |
499 | 499 |
} |
500 | 500 |
|
501 | 501 |
static int hex_search(MpegEncContext * s, int *best, int dmin, |
502 |
- int src_index, int ref_index, int const penalty_factor, |
|
502 |
+ int src_index, int ref_index, const int penalty_factor, |
|
503 | 503 |
int size, int h, int flags, int dia_size) |
504 | 504 |
{ |
505 | 505 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -533,7 +533,7 @@ static int hex_search(MpegEncContext * s, int *best, int dmin, |
533 | 533 |
} |
534 | 534 |
|
535 | 535 |
static int l2s_dia_search(MpegEncContext * s, int *best, int dmin, |
536 |
- int src_index, int ref_index, int const penalty_factor, |
|
536 |
+ int src_index, int ref_index, const int penalty_factor, |
|
537 | 537 |
int size, int h, int flags) |
538 | 538 |
{ |
539 | 539 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -571,7 +571,7 @@ static int l2s_dia_search(MpegEncContext * s, int *best, int dmin, |
571 | 571 |
} |
572 | 572 |
|
573 | 573 |
static int umh_search(MpegEncContext * s, int *best, int dmin, |
574 |
- int src_index, int ref_index, int const penalty_factor, |
|
574 |
+ int src_index, int ref_index, const int penalty_factor, |
|
575 | 575 |
int size, int h, int flags) |
576 | 576 |
{ |
577 | 577 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -618,7 +618,7 @@ static int umh_search(MpegEncContext * s, int *best, int dmin, |
618 | 618 |
} |
619 | 619 |
|
620 | 620 |
static int full_search(MpegEncContext * s, int *best, int dmin, |
621 |
- int src_index, int ref_index, int const penalty_factor, |
|
621 |
+ int src_index, int ref_index, const int penalty_factor, |
|
622 | 622 |
int size, int h, int flags) |
623 | 623 |
{ |
624 | 624 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -681,7 +681,7 @@ static int full_search(MpegEncContext * s, int *best, int dmin, |
681 | 681 |
|
682 | 682 |
#define MAX_SAB_SIZE ME_MAP_SIZE |
683 | 683 |
static int sab_diamond_search(MpegEncContext * s, int *best, int dmin, |
684 |
- int src_index, int ref_index, int const penalty_factor, |
|
684 |
+ int src_index, int ref_index, const int penalty_factor, |
|
685 | 685 |
int size, int h, int flags) |
686 | 686 |
{ |
687 | 687 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -769,7 +769,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin, |
769 | 769 |
} |
770 | 770 |
|
771 | 771 |
static int var_diamond_search(MpegEncContext * s, int *best, int dmin, |
772 |
- int src_index, int ref_index, int const penalty_factor, |
|
772 |
+ int src_index, int ref_index, const int penalty_factor, |
|
773 | 773 |
int size, int h, int flags) |
774 | 774 |
{ |
775 | 775 |
MotionEstContext * const c= &s->me; |
... | ... |
@@ -830,7 +830,7 @@ static int var_diamond_search(MpegEncContext * s, int *best, int dmin, |
830 | 830 |
} |
831 | 831 |
|
832 | 832 |
static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin, |
833 |
- int src_index, int ref_index, int const penalty_factor, |
|
833 |
+ int src_index, int ref_index, const int penalty_factor, |
|
834 | 834 |
int size, int h, int flags){ |
835 | 835 |
MotionEstContext * const c= &s->me; |
836 | 836 |
if(c->dia_size==-1) |
... | ... |
@@ -81,7 +81,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, |
81 | 81 |
bytes_per_scanline; |
82 | 82 |
uint8_t *ptr; |
83 | 83 |
const uint8_t *buf_end = buf + buf_size; |
84 |
- uint8_t const *bufstart = buf; |
|
84 |
+ const uint8_t *bufstart = buf; |
|
85 | 85 |
uint8_t *scanline; |
86 | 86 |
int ret = -1; |
87 | 87 |
|