summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhdenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-28 09:27:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-28 09:28:01 +0200
commit44187717c1611695ff441d22f29c7882bd318ae4 (patch)
tree949776a1190eecf80b669ba277b2d83b952dd15d /libavcodec/dnxhdenc.c
parentfaa338183ba44051e05019411956b41c257c2510 (diff)
parentca6a90465634152c7abe2f10112fd06dc778122f (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: ppc: remove redundant setting of Altivec IDCT mpegvideo: initialise DSPContext in ff_dct_common_init() cosmetics: reindent eac3enc: support writing of basic mixing and info metadata dnxhdenc: fix declarations in for loops dsputil: remove stale bink prototypes and comments dsputil: move a bink-only function to binkdsp dsputil: remove some unused functions bink: make IDCT take 32-bit input Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r--libavcodec/dnxhdenc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index c29144a964..c1f06f28ea 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -79,13 +79,14 @@ static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, DCTELEM *block,
const uint8_t *scantable= ctx->intra_scantable.scantable;
const int *qmat = ctx->q_intra_matrix[qscale];
int last_non_zero = 0;
+ int i;
ctx->dsp.fdct(block);
// Divide by 4 with rounding, to compensate scaling of DCT coefficients
block[0] = (block[0] + 2) >> 2;
- for (int i = 1; i < 64; ++i) {
+ for (i = 1; i < 64; ++i) {
int j = scantable[i];
int sign = block[j] >> 31;
int level = (block[j] ^ sign) - sign;
@@ -634,9 +635,10 @@ static int dnxhd_mb_var_thread(AVCodecContext *avctx, void *arg, int jobnr, int
int sum = 0;
int sqsum = 0;
int mean, sqmean;
+ int i, j;
// Macroblocks are 16x16 pixels, unlike DCT blocks which are 8x8.
- for (int i = 0; i < 16; ++i) {
- for (int j = 0; j < 16; ++j) {
+ 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;
sum += sample;