diff mbox

[FFmpeg-devel] vp9: set color range to MPEG for intraonly profile 0

Message ID 20170819033151.149562-1-jzern@google.com
State Accepted
Commit d8269519e4a338fa9521612db9b68c04a0fb2deb
Headers show

Commit Message

James Zern Aug. 19, 2017, 3:31 a.m. UTC
this is undocumented in the vp9 bitstream and decoding specification
doc, but matches libvpx

Signed-off-by: James Zern <jzern@google.com>
---
 libavcodec/vp9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Zern Aug. 19, 2017, 3:34 a.m. UTC | #1
On Fri, Aug 18, 2017 at 8:31 PM, James Zern <jzern@google.com> wrote:
> this is undocumented in the vp9 bitstream and decoding specification
> doc, but matches libvpx
>

this came up in comparing decode results of ffvp9 and libvpx with
source from a hardware encoder.

> Signed-off-by: James Zern <jzern@google.com>
> ---
>  libavcodec/vp9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index 7d8aced8c8..94430db9a3 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
> @@ -459,7 +459,7 @@ static int decode_frame_header(AVCodecContext *avctx,
>                  s->bytesperpixel = 1;
>                  s->pix_fmt = AV_PIX_FMT_YUV420P;
>                  avctx->colorspace = AVCOL_SPC_BT470BG;
> -                avctx->color_range = AVCOL_RANGE_JPEG;
> +                avctx->color_range = AVCOL_RANGE_MPEG;
>              }
>              s->s.h.refreshrefmask = get_bits(&s->gb, 8);
>              w = get_bits(&s->gb, 16) + 1;
> --
> 2.14.1.480.gb18f417b89-goog
>
Ronald S. Bultje Aug. 19, 2017, 3:04 p.m. UTC | #2
Hi,

On Fri, Aug 18, 2017 at 11:31 PM, James Zern <jzern@google.com> wrote:

> this is undocumented in the vp9 bitstream and decoding specification
> doc, but matches libvpx
>
> Signed-off-by: James Zern <jzern@google.com>
> ---
>  libavcodec/vp9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index 7d8aced8c8..94430db9a3 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
> @@ -459,7 +459,7 @@ static int decode_frame_header(AVCodecContext *avctx,
>                  s->bytesperpixel = 1;
>                  s->pix_fmt = AV_PIX_FMT_YUV420P;
>                  avctx->colorspace = AVCOL_SPC_BT470BG;
> -                avctx->color_range = AVCOL_RANGE_JPEG;
> +                avctx->color_range = AVCOL_RANGE_MPEG;
>

OK.

Ronald
James Zern Aug. 22, 2017, 3:08 a.m. UTC | #3
On Sat, Aug 19, 2017 at 8:04 AM, Ronald S. Bultje <rsbultje@gmail.com> wrote:
> Hi,
>
> On Fri, Aug 18, 2017 at 11:31 PM, James Zern <jzern@google.com> wrote:
>>
>> this is undocumented in the vp9 bitstream and decoding specification
>> doc, but matches libvpx
>>
>> Signed-off-by: James Zern <jzern@google.com>
>> ---
>>  libavcodec/vp9.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
>> index 7d8aced8c8..94430db9a3 100644
>> --- a/libavcodec/vp9.c
>> +++ b/libavcodec/vp9.c
>> @@ -459,7 +459,7 @@ static int decode_frame_header(AVCodecContext *avctx,
>>                  s->bytesperpixel = 1;
>>                  s->pix_fmt = AV_PIX_FMT_YUV420P;
>>                  avctx->colorspace = AVCOL_SPC_BT470BG;
>> -                avctx->color_range = AVCOL_RANGE_JPEG;
>> +                avctx->color_range = AVCOL_RANGE_MPEG;
>
>
> OK.
>

applied. thanks.
diff mbox

Patch

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 7d8aced8c8..94430db9a3 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -459,7 +459,7 @@  static int decode_frame_header(AVCodecContext *avctx,
                 s->bytesperpixel = 1;
                 s->pix_fmt = AV_PIX_FMT_YUV420P;
                 avctx->colorspace = AVCOL_SPC_BT470BG;
-                avctx->color_range = AVCOL_RANGE_JPEG;
+                avctx->color_range = AVCOL_RANGE_MPEG;
             }
             s->s.h.refreshrefmask = get_bits(&s->gb, 8);
             w = get_bits(&s->gb, 16) + 1;