[FFmpeg-devel] [PATCH]Autoselect ffv1 coder also for RGB colourpaces
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Mar 6 16:48:36 CET 2015
Hi!
Attached patch makes the behaviour of ffv1 using gprp more similar
to yuv for >8 bit.
Reported by Christoph Gerstbauer .
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index c3bf759..942bc37 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -780,6 +780,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->colorspace = 1;
s->chroma_planes = 1;
s->version = FFMAX(s->version, 1);
+ if (!s->ac && avctx->coder_type == -1) {
+ av_log(avctx, AV_LOG_INFO, "bits_per_raw_sample > 8, forcing coder 1\n");
+ s->ac = 2;
+ }
if (!s->ac) {
av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample of more than 8 needs -coder 1 currently\n");
return AVERROR(ENOSYS);
More information about the ffmpeg-devel
mailing list