[vlc-devel] [PATCH] avcodec: map the more transfer functions to VLC equivalents

Steve Lhomme robux4 at gmail.com
Thu Jan 5 09:47:52 CET 2017


On Thu, Jan 5, 2017 at 9:46 AM, Stève Lhomme <robux4 at videolabs.io> wrote:
> Uh, wrong title and doesn't compile...
>
> BTW, AVCOL_TRC_GAMMA22 is described as "ITU-R BT470M / ITU-R BT1700
> 625 PAL & SECAM". We map it to SRGB. Does that mean
> TRANSFER_FUNC_BT470_M and TRANSFER_FUNC_SRGB are actually the same ?

AVCOL_TRC_IEC61966_2_1 is defined as "IEC 61966-2-1 (sRGB or sYCC)".

> On Thu, Jan 5, 2017 at 9:32 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
>> ---
>>  modules/codec/avcodec/video.c | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
>> index 461057d..64d5f57 100644
>> --- a/modules/codec/avcodec/video.c
>> +++ b/modules/codec/avcodec/video.c
>> @@ -231,6 +231,18 @@ static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt,
>>          case AVCOL_TRC_BT2020_12:
>>              fmt->transfer = TRANSFER_FUNC_BT2020;
>>              break;
>> +        case AVCOL_TRC_SMPTE2084:
>> +            fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084;
>> +            break;
>> +        case AVCOL_TRC_SMPTE240M:
>> +            fmt->transfer = TRANSFER_FUNC_SMPTE_240;
>> +            break;
>> +        case AVCOL_TRC_GAMMA28:
>> +            fmt->transfer = TRANSFER_FUNC_BT470_BG;
>> +            break;
>> +        case AVCOL_TRC_GAMMA22:
>> +            fmt->transfer = TRANSFER_FUNC_BT470_M;
>> +            break;
>>          default:
>>              break;
>>      }
>> --
>> 2.10.2
>>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list