# HG changeset patch # User michael # Date 1217848642 0 # Node ID 6abd94f87b4523d1b1340a7cb2e4d3799d842d5a # Parent 12d42593e4679bb2fb844aa946f4de8bc6eacd51 Fix dist_scale_factor for long term reference pictures. diff -r 12d42593e467 -r 6abd94f87b45 h264.c --- a/h264.c Mon Aug 04 08:25:38 2008 +0000 +++ b/h264.c Mon Aug 04 11:17:22 2008 +0000 @@ -880,7 +880,7 @@ for(i=0; iref_count[0]; i++){ int poc0 = h->ref_list[0][i].poc; int td = av_clip(poc1 - poc0, -128, 127); - if(td == 0 /* FIXME || pic0 is a long-term ref */){ + if(td == 0 || h->ref_list[0][i].long_ref){ h->dist_scale_factor[i] = 256; }else{ int tb = av_clip(poc - poc0, -128, 127);