[x264-devel] commit: Cosmetic: fix C99-ism (Jason Garrett-Glaser )
git version control
git at videolan.org
Thu Jun 5 19:31:02 CEST 2008
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Jun 5 11:32:05 2008 -0600| [100d067b75ef8b27c288917b3af763fe433af624]
Cosmetic: fix C99-ism
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=100d067b75ef8b27c288917b3af763fe433af624
---
encoder/ratecontrol.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index a049f74..9983714 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -1794,6 +1794,7 @@ static int init_pass2( x264_t *h )
double weight_sum = 0;
double cplx_sum = 0;
double weight = 1.0;
+ double gaussian_weight;
int j;
/* weighted average of cplx of future frames */
for(j=1; j<cplxblur*2 && j<rcc->num_entries-i; j++){
@@ -1801,7 +1802,7 @@ static int init_pass2( x264_t *h )
weight *= 1 - pow( (float)rcj->i_count / rcc->nmb, 2 );
if(weight < .0001)
break;
- double gaussian_weight = weight * exp(-j*j/200.0);
+ gaussian_weight = weight * exp(-j*j/200.0);
weight_sum += gaussian_weight;
cplx_sum += gaussian_weight * (qscale2bits(rcj, 1) - rcj->misc_bits);
}
@@ -1809,7 +1810,7 @@ static int init_pass2( x264_t *h )
weight = 1.0;
for(j=0; j<=cplxblur*2 && j<=i; j++){
ratecontrol_entry_t *rcj = &rcc->entry[i-j];
- double gaussian_weight = weight * exp(-j*j/200.0);
+ gaussian_weight = weight * exp(-j*j/200.0);
weight_sum += gaussian_weight;
cplx_sum += gaussian_weight * (qscale2bits(rcj, 1) - rcj->misc_bits);
weight *= 1 - pow( (float)rcj->i_count / rcc->nmb, 2 );
More information about the x264-devel
mailing list