[FFmpeg-devel] [PATCH 4/4] vc2enc: only warn on a non-standard base video format

Michael Niedermayer michael at niedermayer.cc
Sun Apr 17 04:40:51 CEST 2016


On Wed, Mar 02, 2016 at 01:14:52PM +0000, Rostislav Pehlivanov wrote:
> This commit is up for discussion.
> 
> Requiring the user to reduce the strictness just to encode some random
> file (which decodes fine in all implementations except 1) isn't helping
> the encoder at all. The encoder needs to be used to get bug reports and
> to be improved by multiple people. Only supporting 5 popular broadcast
> formats (1080/720 at 23.97p/25i/29.97i/50p/59.94p) because some
> obscure hardware decoder might not be able to decode anything
> outside of exactly 2 of those formats is no reason to lock down the
> encoder when the specifications clearly give you the tools to encode
> files or pictures with arbitrary sizes, frame rates, pixel formats or
> pixel ranges.
> 
> Therefore, only warn if the video format does not belong to the small
> limited set of formats that the very few existing hardware decoders in
> the world can't handle. That way the encoder will see more use and
> therefore more bug reports.
> 
> The commit is up for discussion, so it would be nice to hear an opposing
> view on this problem.
> 
> Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> ---
>  libavcodec/vc2enc.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
> index 3bc60a3..af17b15 100644
> --- a/libavcodec/vc2enc.c
> +++ b/libavcodec/vc2enc.c
> @@ -1109,14 +1109,9 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx)
>      }
>  
>      if (s->base_vf <= 0) {
> -        if (avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
> -            s->strict_compliance = s->base_vf = 0;
> -            av_log(avctx, AV_LOG_WARNING, "Disabling strict compliance\n");
> -        } else {
> -            av_log(avctx, AV_LOG_WARNING, "Given format does not strictly comply with "
> -                   "the specifications, please add a -strict -1 flag to use it\n");
> -            return AVERROR_UNKNOWN;
> -        }
> +        s->base_vf = 0;
> +        av_log(avctx, AV_LOG_WARNING, "Unable to find a suitable base video format, "
> +                                      "output file might not be strictly spec-compliant\n");

is this a spec compliance or a profile compliance issue or something
else ?

from just the Commit message above it sounds a bit like a profile /
hw decoder limitation, in which case this patch with a different
av_log() message should be ok ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160417/c879dd2b/attachment.sig>


More information about the ffmpeg-devel mailing list