[FFmpeg-devel] [PATCH 03/15] lavu/videotoolbox: add 422 and 444 pixel format mappings

Ridley Combs rcombs at rcombs.me
Tue Nov 16 10:05:29 EET 2021



> On Nov 16, 2021, at 01:21, Wang Bin <wbsecg1 at gmail.com> wrote:
> 
> Ridley Combs <rcombs at rcombs.me <mailto:rcombs at rcombs.me>> 于2021年11月16日周二 上午11:03写道:
> 
>> 
>> 
>>> On Nov 15, 2021, at 19:35, Wang Bin <wbsecg1 at gmail.com> wrote:
>>> 
>>>> 
>>>> +#if HAVE_KCVPIXELFORMATTYPE_422YPCBCR10BIPLANARVIDEORANGE
>>>> +    { kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange, false,
>>>> AV_PIX_FMT_NV20 },
>>>> +    { kCVPixelFormatType_422YpCbCr10BiPlanarFullRange,  true,
>>>> AV_PIX_FMT_NV20 },
>>>> +#endif
>>>> 
>>> 
>>> It's p210, not nv20.
>> 
>> I didn't add a P210 format (since that would've been equivalent to the
>> existing NV20), only P410/P216/P416.
> 
> 
> P210 != NV20. The lower 6 bits of P210 are zeros and must be shifted away.

Oh dang, I'd totally missed NV20 being data-in-low-bits. This explains some oddities I'd run into with ProRes, and indeed adding a proper P210 pixfmt fixes them (so I can remove a wonky workaround). Thanks for the catch, fixed.

> 
> 
>> I guess I could add P210 as an alias with appropriate enum values and
>> macros?
> 
> 
> Not an alias. Add a new one like p010, p410 etc.
> 
> 
>> In which case maybe defining the rest of the group (P008 for NV12, P208
>> for NV16, P408 for NV24) would be worthwhile.
>> 
>> 
> Maybe.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org <mailto:ffmpeg-devel at ffmpeg.org>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org <mailto:ffmpeg-devel-request at ffmpeg.org> with subject "unsubscribe".



More information about the ffmpeg-devel mailing list