diff mbox

[FFmpeg-devel] prores: Always assume limited range

Message ID 20170927212812.11108-1-vittorio.giovara@gmail.com
State Accepted
Commit 755207dc53d6d18a4a9e07ffb0d3a10f75836f79
Headers show

Commit Message

Vittorio Giovara Sept. 27, 2017, 9:28 p.m. UTC
As defined by the spcifications
---
 libavcodec/proresdec_lgpl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

wm4 Sept. 27, 2017, 9:40 p.m. UTC | #1
On Wed, 27 Sep 2017 17:28:12 -0400
Vittorio Giovara <vittorio.giovara@gmail.com> wrote:

> As defined by the spcifications
> ---
>  libavcodec/proresdec_lgpl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
> index bc5bdb5a4d..c86d433f50 100644
> --- a/libavcodec/proresdec_lgpl.c
> +++ b/libavcodec/proresdec_lgpl.c
> @@ -177,6 +177,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
>      avctx->color_primaries = buf[14];
>      avctx->color_trc       = buf[15];
>      avctx->colorspace      = buf[16];
> +    avctx->color_range     = AVCOL_RANGE_MPEG;
>  
>      ctx->qmat_changed = 0;
>      ptr   = buf + 20;

LGTM. (A bit disgusted at Prores...)
Kieran O Leary Sept. 27, 2017, 10:58 p.m. UTC | #2
On Wed, Sep 27, 2017 at 10:28 PM, Vittorio Giovara
<vittorio.giovara@gmail.com> wrote:
> As defined by the spcifications

Is this the paywalled SMPTE spec? I don't see any mention of it in the
openly available whitepaper,
https://images.apple.com/final-cut-pro/docs/Apple_ProRes_White_Paper.pdf
diff mbox

Patch

diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index bc5bdb5a4d..c86d433f50 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -177,6 +177,7 @@  static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     avctx->color_primaries = buf[14];
     avctx->color_trc       = buf[15];
     avctx->colorspace      = buf[16];
+    avctx->color_range     = AVCOL_RANGE_MPEG;
 
     ctx->qmat_changed = 0;
     ptr   = buf + 20;