]> git.sesse.net Git - ffmpeg/commit
avcodec/nvdec: Add support for decoding monochrome av1
authorPhilip Langdale <philipl@overt.org>
Sun, 6 Dec 2020 04:25:29 +0000 (20:25 -0800)
committerPhilip Langdale <philipl@overt.org>
Sun, 6 Dec 2020 22:59:24 +0000 (14:59 -0800)
commit67bb11b5f6548c3b273b575f44077db19bb9a98e
tree5cf07b8f2c6e20ea2d34a82cf86ab9fd0a22d516
parent51dfd6f1bdb03bfc7574b12e921fb3b8639ba5cf
avcodec/nvdec: Add support for decoding monochrome av1

The nvidia hardware explicitly supports decoding monochrome content,
presumably for the AVIF alpha channel. Supporting this requires an
adjustment in av1dec and explicit monochrome detection in nvdec.

I'm not sure why the monochrome path in av1dec did what it did - it
seems non-functional - YUV440P doesn't seem a logical pix_fmt for
monochrome and conditioning on chroma sub-sampling doesn't make sense.
So I changed it.

I've tested 8bit content, but I haven't found a way to create a 10bit
sample, so that path is untested for now.
libavcodec/av1dec.c
libavcodec/nvdec.c
libavcodec/version.h