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 <atomnu...@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");
     } else {
         av_log(avctx, AV_LOG_INFO, "Selected base video format = %i\n", 
s->base_vf);
     }
-- 
2.7.0.79.gdc08a19

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to