[x264-devel] commit: Make intra refresh finish one frame faster (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Sun Sep 19 03:19:53 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Sep 16 03:36:17 2010 -0700| [0974adfbb024af0afe511a803af73cdc283686d7] | committer: Jason Garrett-Glaser 

Make intra refresh finish one frame faster
In some cases, the last frame of intra refresh was redundant.
Saves a few bits.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=0974adfbb024af0afe511a803af73cdc283686d7
---

 encoder/encoder.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index e9aa05c..0439a3a 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -2576,6 +2576,9 @@ int     x264_encoder_encode( x264_t *h,
             h->fdec->i_pir_start_col = h->fdec->f_pir_position+0.5;
             h->fdec->f_pir_position += increment * pocdiff;
             h->fdec->i_pir_end_col = h->fdec->f_pir_position+0.5;
+            /* If our intra refresh has reached the right side of the frame, we're done. */
+            if( h->fdec->i_pir_end_col >= h->mb.i_mb_width - 1 )
+                h->fdec->f_pir_position = h->mb.i_mb_width;
         }
     }
 



More information about the x264-devel mailing list