X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fmpeg2enc%2Fratectl.c;h=19242cddefe87ba1e5ae4c8a2e5fc25d66655e84;hb=d684013dedfefefcb8ca4bbea527382c91521532;hp=768384307e752f852a951b989a90b406cab72ff4;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/mpeg2enc/ratectl.c b/cinelerra-5.1/mpeg2enc/ratectl.c index 76838430..19242cdd 100644 --- a/cinelerra-5.1/mpeg2enc/ratectl.c +++ b/cinelerra-5.1/mpeg2enc/ratectl.c @@ -191,7 +191,7 @@ unsigned char *p; int lx; { int j; - register unsigned int v, s, s2; + unsigned int v, s, s2; s = s2 = 0; @@ -253,9 +253,9 @@ static double calc_actj(pict_data_s *picture) */ - for( l = 0; l < 6; ++l ) - actsum += - (*pquant_weight_coeff_sum) + if( cur_picture.mbinfo[k].dctblocks ) + for( l = 0; l < 6; ++l ) + actsum += (*pquant_weight_coeff_sum) ( cur_picture.mbinfo[k].dctblocks[l], i_q_mat ) ; actj = (double)actsum / (double)COEFFSUM_SCALE; if( actj < 12.0 )