Re: [FFmpeg-devel] The log level of "co located POCs unavailable" should not be ERROR

2019-03-02 Thread Yukun Guo
On Sun, 3 Mar 2019 at 00:41, Michael Niedermayer wrote:

> If the frame is copied, its copy would be at a different point in
> time so it may need a different poc and simply copying it might
> cause issues

Sorry I didn't state it clearly. What I meant is POC = previous POC +
2, not copied [1]. This is correct, since the frame is missing you
don't have better choices. I just wonder why not set field_poc? If I
add these two lines:

h->short_ref[0]->field_poc[0] = prev->field_poc[0] + 2;
h->short_ref[0]->field_poc[1] = prev->field_poc[1] + 2;

I find the error message is gone (only test videos that use frame coding
throughout).

[1]:
https://github.com/FFmpeg/FFmpeg/blob/n4.1.1/libavcodec/h264_slice.c#L1599)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] The log level of "co located POCs unavailable" should not be ERROR

2019-03-01 Thread Yukun Guo
On Fri, 1 Mar 2019 at 05:30, Michael Niedermayer wrote:
> When data is missing (in live streaming or otherwise) it under
> almost all cases cannot be losslessly recovered. So this use matches
> the definition

Yes, this is reasonable. But then "Frame num gap" should be of ERROR
level too. H.264 standard states if there is a frame num gap, the
decoder should infer an unintentional loss of pictures, assuming
gaps_in_frame_num_value_allowed_flag = 0. But it is possible that
FFmpeg encounters a frame loss but does not print any error messages,
because the error concealment procedure
(https://github.com/FFmpeg/FFmpeg/blob/n4.1.1/libavcodec/h264_slice.c#L1577)
will clone the previous frame in place of the missing one.

Also, regarding to the error concealment, why isn't
`short_ref[0].field_poc` copied for cloned frames? The unset field_poc
causes "co located POCs unavailable" error, despite
`ref_list[1][0].poc` is valid when doing spatial direct predition.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] The log level of "co located POCs unavailable" should not be ERROR

2019-02-27 Thread Yukun Guo
The error message "co located POCs unavailable" is reported when the
co-located picture of an H.264 B frame is missing during spatial direct
predition. It comes from this line:
https://github.com/FFmpeg/FFmpeg/blob/n4.1.1/libavcodec/h264_direct.c#L156
and was originally commited for solving an issue found by fuzzing:
https://bugzilla.mozilla.org/show_bug.cgi?id=1230286.

I think the condition is quite normal for live streaming, 1) when the
player first connects to the streaming server, it may receive B frames
whose reference frames have never been sent; 2) when the bandwidth is
limited, the server purposely drops packets due to buffer overflow.
IMHO the log level should be on par with "Frame num gap" (if
`gaps_in_frame_num_value_allowed_flag` is false) and "no picture"
(both are found in h264_slice.c and use DEBUG level).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel