[libav-devel] [PATCH] hevc_ps: Use AV_PIX_FMT_YUVJ420P if YUV 4:2:0 8-bit full scale.

Vittorio Giovara vittorio.giovara at gmail.com
Mon Nov 4 17:10:15 CET 2013


On Mon, Nov 4, 2013 at 11:55 AM, Vittorio Giovara
<vittorio.giovara at gmail.com> wrote:
> On Sun, Nov 3, 2013 at 8:47 PM, Yusuke Nakamura
> <muken.the.vfrmaniac at gmail.com> wrote:
>> ---
>>  libavcodec/hevc_ps.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
>> index 15f73be..a51784d 100644
>> --- a/libavcodec/hevc_ps.c
>> +++ b/libavcodec/hevc_ps.c
>> @@ -449,6 +449,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
>>          vui->video_format                    = get_bits(gb, 3);
>>          vui->video_full_range_flag           = get_bits1(gb);
>>          vui->colour_description_present_flag = get_bits1(gb);
>> +        if (vui->video_full_range_flag && sps->pix_fmt == AV_PIX_FMT_YUV420P)
>> +            sps->pix_fmt = AV_PIX_FMT_YUVJ420P;
>>          if (vui->colour_description_present_flag) {
>>              vui->colour_primaries        = get_bits(gb, 8);
>>              vui->transfer_characteristic = get_bits(gb, 8);
>
> This looks fine, can you just add a FIXME comment that you're doing
> this for swscale compatibility?
> Vittorio

Queued without comment as preferred by the author.
Let's not forget about it when avscale comes...
Vittorio


More information about the libav-devel mailing list