Fix GF interval for non-lagged ARFs
When ARFs are enabled in non-lagged compress modes, the GF interval
was being reset to zero. Non-lagged ARF updates were enabled in commit
63ccfbd, but this incorrect GF interval caused a quality regression.
Change-Id: I615c3b493f4ce2127044f4e68d0bcb07d6b730c3
			
			
This commit is contained in:
		@@ -1403,6 +1403,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Should we use the alternate refernce frame
 | 
					    // Should we use the alternate refernce frame
 | 
				
			||||||
    if (cpi->oxcf.play_alternate &&
 | 
					    if (cpi->oxcf.play_alternate &&
 | 
				
			||||||
 | 
					        cpi->oxcf.lag_in_frames &&
 | 
				
			||||||
        (i >= MIN_GF_INTERVAL) &&
 | 
					        (i >= MIN_GF_INTERVAL) &&
 | 
				
			||||||
        (i <= (cpi->frames_to_key - MIN_GF_INTERVAL)) &&          // dont use ARF very near next kf
 | 
					        (i <= (cpi->frames_to_key - MIN_GF_INTERVAL)) &&          // dont use ARF very near next kf
 | 
				
			||||||
        (((next_frame.pcnt_inter > 0.75) &&
 | 
					        (((next_frame.pcnt_inter > 0.75) &&
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1344,8 +1344,8 @@ void vp8_new_frame_rate(VP8_COMP *cpi, double framerate)
 | 
				
			|||||||
        cpi->max_gf_interval = 12;
 | 
					        cpi->max_gf_interval = 12;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Special conditions when altr ref frame enabled
 | 
					    // Special conditions when altr ref frame enabled in lagged compress mode
 | 
				
			||||||
    if (cpi->oxcf.play_alternate)
 | 
					    if (cpi->oxcf.play_alternate && cpi->oxcf.lag_in_frames)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (cpi->max_gf_interval > cpi->oxcf.lag_in_frames - 1)
 | 
					        if (cpi->max_gf_interval > cpi->oxcf.lag_in_frames - 1)
 | 
				
			||||||
            cpi->max_gf_interval = cpi->oxcf.lag_in_frames - 1;
 | 
					            cpi->max_gf_interval = cpi->oxcf.lag_in_frames - 1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user