Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-16 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Nicolas George > Sent: Tuesday, June 16, 2020 21:40 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and > recreate encoder instance if resolution ch

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-16 Thread Nicolas George
Fu, Linjie (12020-06-16): > Chapter 2.3 Parameter Sets in < High Efficiency Video Coding (HEVC) > Algorithms and Architectures> [1]: That is ONE codec. Not all of them. > Indeed, the definition in spec is just the conformance, and how an encoder is > implemented in Libavcodec (and external librar

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-16 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Nicolas George > Sent: Tuesday, June 16, 2020 18:55 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and > recreate encoder instance if resolution ch

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-16 Thread Nicolas George
Fu, Linjie (12020-06-12): > IIRC, the global header in extra data is optional in codec level. Where did you take that? The way I understand it, people who design codec will decide if they use global extradata or not, but if they decide to, it is necessary to decode the data. Otherwise, it would n

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-14 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of Fu, > Linjie > Sent: Friday, June 12, 2020 10:39 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and > recreate encoder instance if resolution changes > > > From: Nicolas George > &g

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-11 Thread Fu, Linjie
> From: Nicolas George > Sent: Friday, June 12, 2020 00:49 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Cc: Fu, Linjie > Subject: Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and > recreate encoder instance if resolution changes >

Re: [FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-11 Thread Nicolas George
Linjie Fu (12020-06-11): > Add recreate_encoder_instance() function. > > If resolution changing is allowed, discard AV_CODEC_FLAG_GLOBAL_HEADER > even if the avformat/container declares AVFMT_GLOBALHEADER flag. Place > header information in every keyframe instead of single global header. Why? How

[FFmpeg-devel] [PATCH v2 4/5] fftools/ffmpeg: flush and recreate encoder instance if resolution changes

2020-06-11 Thread Linjie Fu
Add recreate_encoder_instance() function. If resolution changing is allowed, discard AV_CODEC_FLAG_GLOBAL_HEADER even if the avformat/container declares AVFMT_GLOBALHEADER flag. Place header information in every keyframe instead of single global header. Signed-off-by: Linjie Fu --- Should be squ