[x264-devel] one question about calculate_durations()

qw applemax82 at 163.com
Wed Jan 15 10:21:46 CET 2020


Hi,


I read x264 source code, and have one question:


https://code.videolan.org/videolan/x264/blob/master/encoder/slicetype.c#L1203


in the function of calculate_durations(), if cur_frame->i_dpb_output_delay < 0, cur_frame->i_dpb_output_delay is set to 0, and previous frame's i_cpb_duration is adjusted via 'prev_frame->i_cpb_duration+=cur_frame->i_dpb_output_delay'.


Before previous frame's i_cpb_duration is adjusted, cur_frame->i_dpb_output_delay is set to 0. Therefore, I think, there is no need adjusting prev_frame->i_cpb_duration like 'prev_frame->i_cpb_duration += cur_frame->i_dpb_output_delay'.


Is that right?


Thanks!


Regards


Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20200115/eb83cef5/attachment.html>


More information about the x264-devel mailing list