Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Rheinhardt 2b2380c098 avfilter: Constify non-const filters
This makes the filters match their declaration in
libavfilter/allfilters.c; the earlier discrepancy was btw UB.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-01 21:29:01 +02:00
rcombs 8e24a8e93a lavfi/metal: fix build with pre-10.11 deployment targets
- Ensure the yadif .metal compiles when targeting any Metal runtime version
- Use some preprocessor awkwardness to ensure Core Video's Metal-specific
  functionality is exposed regardless of our deployment target (this works
  around what seems to be an SDK header bug, filed as FB9816002)
- Ensure all direct references to Metal functions and classes are gated
  behind runtime version checks (this satisfies clang's deployment-target
  violation warnings provided by -Wunguarded-availability).
2021-12-22 18:43:34 -06:00
rcombs 2d16182e7d lavfi/metal: don't use braced-include for internal headers 2021-12-22 18:43:34 -06:00
Aman Karmani 4ac869ca2a avfilter: add vf_yadif_videotoolbox
deinterlaces CVPixelBuffers, i.e. AV_PIX_FMT_VIDEOTOOLBOX frames

for example, an interlaced mpeg2 video can be decoded by avcodec,
uploaded into a CVPixelBuffer, deinterlaced by Metal, and then
encoded to h264 by VideoToolbox as follows:

    ffmpeg \
           -init_hw_device videotoolbox \
           -i interlaced.ts \
           -vf hwupload,yadif_videotoolbox \
           -c:v h264_videotoolbox \
           -b:v 2000k \
           -c:a copy \
           -y progressive.ts

(note that uploading AVFrame into CVPixelBuffer via hwupload
 requires 504c60660d)

this work is sponsored by Fancy Bits LLC

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-18 11:57:31 -08:00