avutil/hwcontext_videotoolbox: implement hwupload to convert AVFrame to CVPixelBuffer
authorAman Karmani <aman@tmm1.net>
Tue, 29 Jun 2021 21:43:16 +0000 (14:43 -0700)
committerAman Karmani <aman@tmm1.net>
Sun, 18 Jul 2021 19:01:16 +0000 (12:01 -0700)
commit504c60660d3194758823ddd45ceddb86e35d806f
treea9db3e34e3712ff064c21e589f38c64017d4e4f1
parent997f9bdb99de18b27f8f213f381c5e90536a1be9
avutil/hwcontext_videotoolbox: implement hwupload to convert AVFrame to CVPixelBuffer

Teach AV_HWDEVICE_TYPE_VIDEOTOOLBOX to be able to create AVFrames of type
AV_PIX_FMT_VIDEOTOOLBOX. This can be used to hwupload a regular AVFrame
into its CVPixelBuffer equivalent.

    ffmpeg -init_hw_device videotoolbox -f lavfi -i color=black:640x480 -vf hwupload -c:v h264_videotoolbox -f null -y /dev/null

Signed-off-by: Aman Karmani <aman@tmm1.net>
libavutil/hwcontext_videotoolbox.c
libavutil/hwcontext_videotoolbox.h
libavutil/version.h