av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
}
} else {
- if (seq->color_config.subsampling_x == 1 &&
- seq->color_config.subsampling_y == 1)
- pix_fmt = AV_PIX_FMT_YUV440P;
+ if (bit_depth == 8)
+ pix_fmt = AV_PIX_FMT_GRAY8;
+ else if (bit_depth == 10)
+ pix_fmt = AV_PIX_FMT_GRAY10;
+ else if (bit_depth == 12)
+ pix_fmt = AV_PIX_FMT_GRAY12;
else
av_log(avctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
}
#endif
#if CONFIG_AV1_VAAPI_HWACCEL
*fmtp++ = AV_PIX_FMT_VAAPI;
+#endif
+ break;
+ case AV_PIX_FMT_GRAY8:
+#if CONFIG_AV1_NVDEC_HWACCEL
+ *fmtp++ = AV_PIX_FMT_CUDA;
+#endif
+ break;
+ case AV_PIX_FMT_GRAY10:
+#if CONFIG_AV1_NVDEC_HWACCEL
+ *fmtp++ = AV_PIX_FMT_CUDA;
#endif
break;
}
{
int shift_h = 0, shift_v = 0;
+ if (av_pix_fmt_count_planes(pix_fmt) == 1)
+ return cudaVideoChromaFormat_Monochrome;
+
av_pix_fmt_get_chroma_sub_sample(pix_fmt, &shift_h, &shift_v);
if (shift_h == 1 && shift_v == 1)
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 115
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \