[FFmpeg-devel] [PATCH v4 1/4] hevc_mp4toannexb: Insert correct parameter sets before IRAP

Fu, Linjie linjie.fu at intel.com
Thu Sep 19 05:16:22 EEST 2019


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Andriy Gelman
> Sent: Thursday, September 19, 2019 03:32
> To: ffmpeg-devel at ffmpeg.org
> Cc: Andriy Gelman <andriy.gelman at gmail.com>
> Subject: [FFmpeg-devel] [PATCH v4 1/4] hevc_mp4toannexb: Insert correct
> parameter sets before IRAP
> 
> From: Andriy Gelman <andriy.gelman at gmail.com>
> 
> Fixes #7799
> 
> Currently, the mp4toannexb filter always inserts the same extradata at
> the start of the first IRAP unit. As in ticket #7799, this can lead to
> decoding errors if modified parameter sets are signalled in-band.
> 
> This commit keeps track of the VPS/SPS/PPS parameter sets during the
> conversion. The correct combination is inserted at the start of the
> first IRAP. SEIs from extradata are inserted before each IRAP.
> 
> This commit also makes an update to the hevc-bsf-mp4toannexb fate test
> since the result before this patch contained duplicate parameter sets
> in-band.
> ---
>  libavcodec/hevc_mp4toannexb_bsf.c | 490
> +++++++++++++++++++++++++++---
>  tests/fate/hevc.mak               |   2 +-
>  2 files changed, 457 insertions(+), 35 deletions(-)
> 
> --- a/tests/fate/hevc.mak
> +++ b/tests/fate/hevc.mak
> @@ -238,7 +238,7 @@ FATE_HEVC-$(call ALLYES, HEVC_DEMUXER
> MOV_DEMUXER HEVC_MP4TOANNEXB_BSF MOV_MUXER
>  fate-hevc-bsf-mp4toannexb: tests/data/hevc-mp4.mov
>  fate-hevc-bsf-mp4toannexb: CMD = md5 -i
> $(TARGET_PATH)/tests/data/hevc-mp4.mov -c:v copy -fflags +bitexact -f
> hevc
>  fate-hevc-bsf-mp4toannexb: CMP = oneline
> -fate-hevc-bsf-mp4toannexb: REF = 1873662a3af1848c37e4eb25722c8df9
> +fate-hevc-bsf-mp4toannexb: REF = 3c9d998a3aa2b9e0fb1c1f434952bf8b

I kind of remember some discussions about 3 or 4 bit start code for hevc:
https://ffmpeg.org/pipermail/ffmpeg-devel/2018-November/236899.html

Since this patch intends to modify the md5 in fate, maybe it's a good time to
have this fixed as well.

- linjie


More information about the ffmpeg-devel mailing list