update Features5.pdf, fixes for awindowgui
[goodguy/history.git] / cinelerra-5.1 / mpeg2enc / ratectl.c
index 768384307e752f852a951b989a90b406cab72ff4..1fc465aa04dfabd8795e865cc91e7d187f655aa3 100644 (file)
@@ -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 )