Mercurial > libavcodec.hg
diff mpegvideo.c @ 64:5aa6292a1660 libavcodec
win32 fixes
author | glantau |
---|---|
date | Mon, 13 Aug 2001 21:48:05 +0000 |
parents | 35c1141e23d9 |
children | 79be2c581c01 |
line wrap: on
line diff
--- a/mpegvideo.c Mon Aug 13 21:46:21 2001 +0000 +++ b/mpegvideo.c Mon Aug 13 21:48:05 2001 +0000 @@ -81,7 +81,8 @@ /* 16 <= qscale * quant_matrix[i] <= 7905 */ /* 19952 <= aanscales[i] * qscale * quant_matrix[i] <= 249205026 */ - qmat[i] = (int)((1ULL << (QMAT_SHIFT + 11)) / (aanscales[i] * qscale * quant_matrix[i])); + qmat[i] = (int)((UINT64_C(1) << (QMAT_SHIFT + 11)) / + (aanscales[i] * qscale * quant_matrix[i])); } } else { for(i=0;i<64;i++) { @@ -983,6 +984,10 @@ av_fdct (block); + /* we need this permutation so that we correct the IDCT + permutation. will be moved into DCT code */ + block_permute(block); + if (s->mb_intra) { if (n < 4) q = s->y_dc_scale; @@ -1251,7 +1256,7 @@ */ static int rate_estimate_qscale(MpegEncContext *s) { - long long total_bits = s->total_bits; + INT64 total_bits = s->total_bits; float q; int qscale, diff, qmin; @@ -1276,9 +1281,9 @@ q = 31; qscale = (int)(q + 0.5); #if defined(DEBUG) - printf("%d: total=%Ld br=%0.1f diff=%d qest=%0.1f\n", + printf("%d: total=%0.0f br=%0.1f diff=%d qest=%0.1f\n", s->picture_number, - total_bits, + (double)total_bits, (float)s->frame_rate / FRAME_RATE_BASE * total_bits / s->picture_number, diff, q);