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

Wang Bin wbsecg1 at gmail.com
Tue Nov 16 09:21:57 EET 2021


Ridley Combs <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.


> 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.


More information about the ffmpeg-devel mailing list