On Mon, Oct 05, 2015 at 08:44:44PM +0200, Christophe Gisquet wrote: > Profiles 1256 & 1270 (currently) signal at the frame header and MB > levels the colorspace used, either RGB or YUV. While a MB-level > varying colorspace is not supported, whether it is constant can be > tracked so as to determine the exact colorspace. > > It is not tested against a true RGB sequence, though. > --- > libavcodec/dnxhddec.c | 82 > ++++++++++++++++++++++++++++++++++++++------------- > 1 file changed, 62 insertions(+), 20 deletions(-) > > diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c > index fec9aac..52fd334 100644 > --- a/libavcodec/dnxhddec.c > +++ b/libavcodec/dnxhddec.c > @@ -43,6 +43,8 @@ typedef struct RowContext { > int last_dc[3]; > int last_qscale; > int errors; > + /** -1:not set yet 0:off=RGB 1:on=YUV 2:variable */ > + int format; > } RowContext; > > typedef struct DNXHDContext { > @@ -202,6 +204,18 @@ static int dnxhd_decode_header(DNXHDContext *ctx, > AVFrame *frame, > } > ctx->avctx->bits_per_raw_sample = ctx->bit_depth; > > + cid = AV_RB32(buf + 0x28); > + if ((ret = dnxhd_init_vlc(ctx, cid)) < 0) > + return ret;
this would allow ctx->bit_depth to be set but without initializing the dsp contexts subsequent runs would also skip init due to " if (ctx->bit_depth != old_bit_depth) {" [....] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel