[FFmpeg-devel] [PATCH 06/11] diracdec: Add 10-bits to pix_fmt table
Michael Niedermayer
michaelni at gmx.at
Wed Dec 9 11:32:14 CET 2015
On Wed, Dec 09, 2015 at 12:05:32AM +0000, Kieran Kunhya wrote:
> ---
> libavcodec/dirac.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c
> index fd6e869..6b1a93b 100644
> --- a/libavcodec/dirac.c
> +++ b/libavcodec/dirac.c
> @@ -109,10 +109,11 @@ static const struct {
> { AVCOL_PRI_BT709, AVCOL_SPC_BT709, AVCOL_TRC_UNSPECIFIED /* DCinema */ },
> };
>
> -/* [DIRAC_STD] Table 10.2 Supported chroma sampling formats + luma Offset */
> -static const enum AVPixelFormat dirac_pix_fmt[2][3] = {
> - { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P },
> - { AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P },
> +/* [DIRAC_STD] Table 10.2 Supported chroma sampling formats */
> +static const enum AVPixelFormat dirac_pix_fmt[][3] = {
> + {AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12},
> + {AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12},
> + {AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12},
> };
>
> /* [DIRAC_STD] 10.3 Parse Source Parameters.
> @@ -236,13 +237,9 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
> avctx->color_range = pixel_range_presets[idx].color_range;
> }
>
> - if (luma_depth > 8)
> - av_log(avctx, AV_LOG_WARNING, "Bitdepth greater than 8\n");
> -
> -
> *bit_depth = luma_depth;
>
> - avctx->pix_fmt = dirac_pix_fmt[!luma_offset][source->chroma_format];
> + avctx->pix_fmt = dirac_pix_fmt[source->chroma_format][source->pixel_range_index-2];
this is maybe missing a < 2 check
i see a > 4 check but didnt find a < 2 check from a quick look
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20151209/3d529143/attachment.sig>
More information about the ffmpeg-devel
mailing list