[FFmpeg-devel] [PATCH 1/3] dnxhddec: better support for 4:4:4
Michael Niedermayer
michael at niedermayer.cc
Tue Oct 6 21:55:31 CEST 2015
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
-------------- 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/20151006/faf3abdb/attachment.sig>
More information about the ffmpeg-devel
mailing list