[x264-devel] Suggestion for a modest size reduction

Andreas Rheinhardt andreas.rheinhardt at googlemail.com
Sat May 27 13:02:03 CEST 2017

Hello x264-developers,

I believe I have found a way to save a few bytes. If one encodes in
open-gop-mode and x264 detects a scenecut, then x264 uses a closed gop, but
instead of using an IDR-frame, it uses a normal I-frame with a recovery
point SEI (with recovery_frame_cnt=0 and exact_match_flag=1). The latter
uses a bit more bytes: There are 9 bytes in the recovery point SEI
(assuming that the start code is four bytes long and there wouldn't
otherwise be an SEI (if so, the recovery point SEI message costs only three
bytes)); sometimes the actual coded slice is one byte shorter if using a
recovery point (there is no idr_pic_id (one or three bit) and the
dec_ref_pic_marking-stuff has only one flag (in the cases that I found) and
not two like it has for IDR pics), but the IDR-frame nevertheless wins. The
next frame after the recovery point is also bigger when using a recovery
point because of the presence of several memory managment control
operations (of type 1, leading to difference_of_pic_nums_minus1 in the
bitstream). Five bytes in my case.
It would be nice if you considered this. Thanks in advance.

Andreas Rheinhardt

PS: I want to use this opportunity to thank you all for providing everyone
with the best H.264 encoder in existence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20170527/2de8969c/attachment.html>

More information about the x264-devel mailing list