diff --git a/src/xpra/codecs/dec_avcodec2/decoder.pyx b/src/xpra/codecs/dec_avcodec2/decoder.pyx index 0e2ac4c6ef..8eb3ed95ff 100644 --- a/src/xpra/codecs/dec_avcodec2/decoder.pyx +++ b/src/xpra/codecs/dec_avcodec2/decoder.pyx @@ -39,16 +39,210 @@ ctypedef unsigned int AVCodecID ctypedef long AVPixelFormat cdef extern from "libavutil/pixfmt.h": + #grep AV_PIX_FMT_ /usr/include/xpra/libavutil/pixfmt.h | grep -e "^\s*AV_PIX_FMT" | sed 's+,+ +g' | awk '{print " AVPixelFormat "$1}' AVPixelFormat AV_PIX_FMT_NONE AVPixelFormat AV_PIX_FMT_YUV420P + AVPixelFormat AV_PIX_FMT_YUYV422 + AVPixelFormat AV_PIX_FMT_RGB24 + AVPixelFormat AV_PIX_FMT_BGR24 AVPixelFormat AV_PIX_FMT_YUV422P AVPixelFormat AV_PIX_FMT_YUV444P - AVPixelFormat AV_PIX_FMT_RGB24 - AVPixelFormat AV_PIX_FMT_0RGB - AVPixelFormat AV_PIX_FMT_BGR0 + AVPixelFormat AV_PIX_FMT_YUV410P + AVPixelFormat AV_PIX_FMT_YUV411P + AVPixelFormat AV_PIX_FMT_GRAY8 + AVPixelFormat AV_PIX_FMT_MONOWHITE + AVPixelFormat AV_PIX_FMT_MONOBLACK + AVPixelFormat AV_PIX_FMT_PAL8 + AVPixelFormat AV_PIX_FMT_YUVJ420P + AVPixelFormat AV_PIX_FMT_YUVJ422P + AVPixelFormat AV_PIX_FMT_YUVJ444P + AVPixelFormat AV_PIX_FMT_UYVY422 + AVPixelFormat AV_PIX_FMT_UYYVYY411 + AVPixelFormat AV_PIX_FMT_BGR8 + AVPixelFormat AV_PIX_FMT_BGR4 + AVPixelFormat AV_PIX_FMT_BGR4_BYTE + AVPixelFormat AV_PIX_FMT_RGB8 + AVPixelFormat AV_PIX_FMT_RGB4 + AVPixelFormat AV_PIX_FMT_RGB4_BYTE + AVPixelFormat AV_PIX_FMT_NV12 + AVPixelFormat AV_PIX_FMT_NV21 AVPixelFormat AV_PIX_FMT_ARGB + AVPixelFormat AV_PIX_FMT_RGBA + AVPixelFormat AV_PIX_FMT_ABGR AVPixelFormat AV_PIX_FMT_BGRA + AVPixelFormat AV_PIX_FMT_GRAY16BE + AVPixelFormat AV_PIX_FMT_GRAY16LE + AVPixelFormat AV_PIX_FMT_YUV440P + AVPixelFormat AV_PIX_FMT_YUVJ440P + AVPixelFormat AV_PIX_FMT_YUVA420P + AVPixelFormat AV_PIX_FMT_RGB48BE + AVPixelFormat AV_PIX_FMT_RGB48LE + AVPixelFormat AV_PIX_FMT_RGB565BE + AVPixelFormat AV_PIX_FMT_RGB565LE + AVPixelFormat AV_PIX_FMT_RGB555BE + AVPixelFormat AV_PIX_FMT_RGB555LE + AVPixelFormat AV_PIX_FMT_BGR565BE + AVPixelFormat AV_PIX_FMT_BGR565LE + AVPixelFormat AV_PIX_FMT_BGR555BE + AVPixelFormat AV_PIX_FMT_BGR555LE + AVPixelFormat AV_PIX_FMT_VAAPI_MOCO + AVPixelFormat AV_PIX_FMT_VAAPI_IDCT + AVPixelFormat AV_PIX_FMT_VAAPI_VLD + AVPixelFormat AV_PIX_FMT_VAAPI + AVPixelFormat AV_PIX_FMT_VAAPI + AVPixelFormat AV_PIX_FMT_YUV420P16LE + AVPixelFormat AV_PIX_FMT_YUV420P16BE + AVPixelFormat AV_PIX_FMT_YUV422P16LE + AVPixelFormat AV_PIX_FMT_YUV422P16BE + AVPixelFormat AV_PIX_FMT_YUV444P16LE + AVPixelFormat AV_PIX_FMT_YUV444P16BE + AVPixelFormat AV_PIX_FMT_DXVA2_VLD + AVPixelFormat AV_PIX_FMT_RGB444LE + AVPixelFormat AV_PIX_FMT_RGB444BE + AVPixelFormat AV_PIX_FMT_BGR444LE + AVPixelFormat AV_PIX_FMT_BGR444BE + AVPixelFormat AV_PIX_FMT_YA8 + AVPixelFormat AV_PIX_FMT_Y400A + AVPixelFormat AV_PIX_FMT_BGR48BE + AVPixelFormat AV_PIX_FMT_BGR48LE + AVPixelFormat AV_PIX_FMT_YUV420P9BE + AVPixelFormat AV_PIX_FMT_YUV420P9LE + AVPixelFormat AV_PIX_FMT_YUV420P10BE + AVPixelFormat AV_PIX_FMT_YUV420P10LE + AVPixelFormat AV_PIX_FMT_YUV422P10BE + AVPixelFormat AV_PIX_FMT_YUV422P10LE + AVPixelFormat AV_PIX_FMT_YUV444P9BE + AVPixelFormat AV_PIX_FMT_YUV444P9LE + AVPixelFormat AV_PIX_FMT_YUV444P10BE + AVPixelFormat AV_PIX_FMT_YUV444P10LE + AVPixelFormat AV_PIX_FMT_YUV422P9BE + AVPixelFormat AV_PIX_FMT_YUV422P9LE AVPixelFormat AV_PIX_FMT_GBRP + AVPixelFormat AV_PIX_FMT_GBR24P + AVPixelFormat AV_PIX_FMT_GBRP9BE + AVPixelFormat AV_PIX_FMT_GBRP9LE + AVPixelFormat AV_PIX_FMT_GBRP10BE + AVPixelFormat AV_PIX_FMT_GBRP10LE + AVPixelFormat AV_PIX_FMT_GBRP16BE + AVPixelFormat AV_PIX_FMT_GBRP16LE + AVPixelFormat AV_PIX_FMT_YUVA422P + AVPixelFormat AV_PIX_FMT_YUVA444P + AVPixelFormat AV_PIX_FMT_YUVA420P9BE + AVPixelFormat AV_PIX_FMT_YUVA420P9LE + AVPixelFormat AV_PIX_FMT_YUVA422P9BE + AVPixelFormat AV_PIX_FMT_YUVA422P9LE + AVPixelFormat AV_PIX_FMT_YUVA444P9BE + AVPixelFormat AV_PIX_FMT_YUVA444P9LE + AVPixelFormat AV_PIX_FMT_YUVA420P10BE + AVPixelFormat AV_PIX_FMT_YUVA420P10LE + AVPixelFormat AV_PIX_FMT_YUVA422P10BE + AVPixelFormat AV_PIX_FMT_YUVA422P10LE + AVPixelFormat AV_PIX_FMT_YUVA444P10BE + AVPixelFormat AV_PIX_FMT_YUVA444P10LE + AVPixelFormat AV_PIX_FMT_YUVA420P16BE + AVPixelFormat AV_PIX_FMT_YUVA420P16LE + AVPixelFormat AV_PIX_FMT_YUVA422P16BE + AVPixelFormat AV_PIX_FMT_YUVA422P16LE + AVPixelFormat AV_PIX_FMT_YUVA444P16BE + AVPixelFormat AV_PIX_FMT_YUVA444P16LE + AVPixelFormat AV_PIX_FMT_VDPAU + AVPixelFormat AV_PIX_FMT_XYZ12LE + AVPixelFormat AV_PIX_FMT_XYZ12BE + AVPixelFormat AV_PIX_FMT_NV16 + AVPixelFormat AV_PIX_FMT_NV20LE + AVPixelFormat AV_PIX_FMT_NV20BE + AVPixelFormat AV_PIX_FMT_RGBA64BE + AVPixelFormat AV_PIX_FMT_RGBA64LE + AVPixelFormat AV_PIX_FMT_BGRA64BE + AVPixelFormat AV_PIX_FMT_BGRA64LE + AVPixelFormat AV_PIX_FMT_YVYU422 + AVPixelFormat AV_PIX_FMT_YA16BE + AVPixelFormat AV_PIX_FMT_YA16LE + AVPixelFormat AV_PIX_FMT_GBRAP + AVPixelFormat AV_PIX_FMT_GBRAP16BE + AVPixelFormat AV_PIX_FMT_GBRAP16LE + AVPixelFormat AV_PIX_FMT_QSV + AVPixelFormat AV_PIX_FMT_MMAL + AVPixelFormat AV_PIX_FMT_D3D11VA_VLD + AVPixelFormat AV_PIX_FMT_CUDA + AVPixelFormat AV_PIX_FMT_0RGB + AVPixelFormat AV_PIX_FMT_RGB0 + AVPixelFormat AV_PIX_FMT_0BGR + AVPixelFormat AV_PIX_FMT_BGR0 + AVPixelFormat AV_PIX_FMT_YUV420P12BE + AVPixelFormat AV_PIX_FMT_YUV420P12LE + AVPixelFormat AV_PIX_FMT_YUV420P14BE + AVPixelFormat AV_PIX_FMT_YUV420P14LE + AVPixelFormat AV_PIX_FMT_YUV422P12BE + AVPixelFormat AV_PIX_FMT_YUV422P12LE + AVPixelFormat AV_PIX_FMT_YUV422P14BE + AVPixelFormat AV_PIX_FMT_YUV422P14LE + AVPixelFormat AV_PIX_FMT_YUV444P12BE + AVPixelFormat AV_PIX_FMT_YUV444P12LE + AVPixelFormat AV_PIX_FMT_YUV444P14BE + AVPixelFormat AV_PIX_FMT_YUV444P14LE + AVPixelFormat AV_PIX_FMT_GBRP12BE + AVPixelFormat AV_PIX_FMT_GBRP12LE + AVPixelFormat AV_PIX_FMT_GBRP14BE + AVPixelFormat AV_PIX_FMT_GBRP14LE + AVPixelFormat AV_PIX_FMT_YUVJ411P + AVPixelFormat AV_PIX_FMT_BAYER_BGGR8 + AVPixelFormat AV_PIX_FMT_BAYER_RGGB8 + AVPixelFormat AV_PIX_FMT_BAYER_GBRG8 + AVPixelFormat AV_PIX_FMT_BAYER_GRBG8 + AVPixelFormat AV_PIX_FMT_BAYER_BGGR16LE + AVPixelFormat AV_PIX_FMT_BAYER_BGGR16BE + AVPixelFormat AV_PIX_FMT_BAYER_RGGB16LE + AVPixelFormat AV_PIX_FMT_BAYER_RGGB16BE + AVPixelFormat AV_PIX_FMT_BAYER_GBRG16LE + AVPixelFormat AV_PIX_FMT_BAYER_GBRG16BE + AVPixelFormat AV_PIX_FMT_BAYER_GRBG16LE + AVPixelFormat AV_PIX_FMT_BAYER_GRBG16BE + AVPixelFormat AV_PIX_FMT_XVMC + AVPixelFormat AV_PIX_FMT_YUV440P10LE + AVPixelFormat AV_PIX_FMT_YUV440P10BE + AVPixelFormat AV_PIX_FMT_YUV440P12LE + AVPixelFormat AV_PIX_FMT_YUV440P12BE + AVPixelFormat AV_PIX_FMT_AYUV64LE + AVPixelFormat AV_PIX_FMT_AYUV64BE + AVPixelFormat AV_PIX_FMT_VIDEOTOOLBOX + AVPixelFormat AV_PIX_FMT_P010LE + AVPixelFormat AV_PIX_FMT_P010BE + AVPixelFormat AV_PIX_FMT_GBRAP12BE + AVPixelFormat AV_PIX_FMT_GBRAP12LE + AVPixelFormat AV_PIX_FMT_GBRAP10BE + AVPixelFormat AV_PIX_FMT_GBRAP10LE + AVPixelFormat AV_PIX_FMT_MEDIACODEC + AVPixelFormat AV_PIX_FMT_GRAY12BE + AVPixelFormat AV_PIX_FMT_GRAY12LE + AVPixelFormat AV_PIX_FMT_GRAY10BE + AVPixelFormat AV_PIX_FMT_GRAY10LE + AVPixelFormat AV_PIX_FMT_P016LE + AVPixelFormat AV_PIX_FMT_P016BE + AVPixelFormat AV_PIX_FMT_D3D11 + AVPixelFormat AV_PIX_FMT_GRAY9BE + AVPixelFormat AV_PIX_FMT_GRAY9LE + AVPixelFormat AV_PIX_FMT_GBRPF32BE + AVPixelFormat AV_PIX_FMT_GBRPF32LE + AVPixelFormat AV_PIX_FMT_GBRAPF32BE + AVPixelFormat AV_PIX_FMT_GBRAPF32LE + AVPixelFormat AV_PIX_FMT_DRM_PRIME + AVPixelFormat AV_PIX_FMT_OPENCL + AVPixelFormat AV_PIX_FMT_GRAY14BE + AVPixelFormat AV_PIX_FMT_GRAY14LE + AVPixelFormat AV_PIX_FMT_GRAYF32BE + AVPixelFormat AV_PIX_FMT_GRAYF32LE + AVPixelFormat AV_PIX_FMT_YUVA422P12BE + AVPixelFormat AV_PIX_FMT_YUVA422P12LE + AVPixelFormat AV_PIX_FMT_YUVA444P12BE + AVPixelFormat AV_PIX_FMT_YUVA444P12LE + AVPixelFormat AV_PIX_FMT_NV24 + AVPixelFormat AV_PIX_FMT_NV42 + AVPixelFormat AV_PIX_FMT_VULKAN + AVPixelFormat AV_PIX_FMT_Y210BE + AVPixelFormat AV_PIX_FMT_Y210LE + AVPixelFormat AV_PIX_FMT_NB + cdef extern from "libavcodec/avcodec.h": int AV_CODEC_FLAG2_FAST @@ -102,6 +296,212 @@ cdef extern from "libavcodec/avcodec.h": void av_frame_unref(AVFrame *frame) nogil +#grep AV_PIX_FMT_ /usr/include/xpra/libavutil/pixfmt.h | grep -e "^\s*AV_PIX_FMT" | sed 's+,+ +g' | sed 's+AV_PIX_FMT_++g' | awk '{print " AV_PIX_FMT_"$1" : \""$1"\","}'^C +FORMAT_TO_STR = { + AV_PIX_FMT_NONE : "NONE", + AV_PIX_FMT_YUV420P : "YUV420P", + AV_PIX_FMT_YUYV422 : "YUYV422", + AV_PIX_FMT_RGB24 : "RGB24", + AV_PIX_FMT_BGR24 : "BGR24", + AV_PIX_FMT_YUV422P : "YUV422P", + AV_PIX_FMT_YUV444P : "YUV444P", + AV_PIX_FMT_YUV410P : "YUV410P", + AV_PIX_FMT_YUV411P : "YUV411P", + AV_PIX_FMT_GRAY8 : "GRAY8", + AV_PIX_FMT_MONOWHITE : "MONOWHITE", + AV_PIX_FMT_MONOBLACK : "MONOBLACK", + AV_PIX_FMT_PAL8 : "PAL8", + AV_PIX_FMT_YUVJ420P : "YUVJ420P", + AV_PIX_FMT_YUVJ422P : "YUVJ422P", + AV_PIX_FMT_YUVJ444P : "YUVJ444P", + AV_PIX_FMT_UYVY422 : "UYVY422", + AV_PIX_FMT_UYYVYY411 : "UYYVYY411", + AV_PIX_FMT_BGR8 : "BGR8", + AV_PIX_FMT_BGR4 : "BGR4", + AV_PIX_FMT_BGR4_BYTE : "BGR4_BYTE", + AV_PIX_FMT_RGB8 : "RGB8", + AV_PIX_FMT_RGB4 : "RGB4", + AV_PIX_FMT_RGB4_BYTE : "RGB4_BYTE", + AV_PIX_FMT_NV12 : "NV12", + AV_PIX_FMT_NV21 : "NV21", + AV_PIX_FMT_ARGB : "ARGB", + AV_PIX_FMT_RGBA : "RGBA", + AV_PIX_FMT_ABGR : "ABGR", + AV_PIX_FMT_BGRA : "BGRA", + AV_PIX_FMT_GRAY16BE : "GRAY16BE", + AV_PIX_FMT_GRAY16LE : "GRAY16LE", + AV_PIX_FMT_YUV440P : "YUV440P", + AV_PIX_FMT_YUVJ440P : "YUVJ440P", + AV_PIX_FMT_YUVA420P : "YUVA420P", + AV_PIX_FMT_RGB48BE : "RGB48BE", + AV_PIX_FMT_RGB48LE : "RGB48LE", + AV_PIX_FMT_RGB565BE : "RGB565BE", + AV_PIX_FMT_RGB565LE : "RGB565LE", + AV_PIX_FMT_RGB555BE : "RGB555BE", + AV_PIX_FMT_RGB555LE : "RGB555LE", + AV_PIX_FMT_BGR565BE : "BGR565BE", + AV_PIX_FMT_BGR565LE : "BGR565LE", + AV_PIX_FMT_BGR555BE : "BGR555BE", + AV_PIX_FMT_BGR555LE : "BGR555LE", + AV_PIX_FMT_VAAPI_MOCO : "VAAPI_MOCO", + AV_PIX_FMT_VAAPI_IDCT : "VAAPI_IDCT", + AV_PIX_FMT_VAAPI_VLD : "VAAPI_VLD", + AV_PIX_FMT_VAAPI : "VAAPI", + AV_PIX_FMT_VAAPI : "VAAPI", + AV_PIX_FMT_YUV420P16LE : "YUV420P16LE", + AV_PIX_FMT_YUV420P16BE : "YUV420P16BE", + AV_PIX_FMT_YUV422P16LE : "YUV422P16LE", + AV_PIX_FMT_YUV422P16BE : "YUV422P16BE", + AV_PIX_FMT_YUV444P16LE : "YUV444P16LE", + AV_PIX_FMT_YUV444P16BE : "YUV444P16BE", + AV_PIX_FMT_DXVA2_VLD : "DXVA2_VLD", + AV_PIX_FMT_RGB444LE : "RGB444LE", + AV_PIX_FMT_RGB444BE : "RGB444BE", + AV_PIX_FMT_BGR444LE : "BGR444LE", + AV_PIX_FMT_BGR444BE : "BGR444BE", + AV_PIX_FMT_YA8 : "YA8", + AV_PIX_FMT_Y400A : "Y400A", + AV_PIX_FMT_BGR48BE : "BGR48BE", + AV_PIX_FMT_BGR48LE : "BGR48LE", + AV_PIX_FMT_YUV420P9BE : "YUV420P9BE", + AV_PIX_FMT_YUV420P9LE : "YUV420P9LE", + AV_PIX_FMT_YUV420P10BE : "YUV420P10BE", + AV_PIX_FMT_YUV420P10LE : "YUV420P10LE", + AV_PIX_FMT_YUV422P10BE : "YUV422P10BE", + AV_PIX_FMT_YUV422P10LE : "YUV422P10LE", + AV_PIX_FMT_YUV444P9BE : "YUV444P9BE", + AV_PIX_FMT_YUV444P9LE : "YUV444P9LE", + AV_PIX_FMT_YUV444P10BE : "YUV444P10BE", + AV_PIX_FMT_YUV444P10LE : "YUV444P10LE", + AV_PIX_FMT_YUV422P9BE : "YUV422P9BE", + AV_PIX_FMT_YUV422P9LE : "YUV422P9LE", + AV_PIX_FMT_GBRP : "GBRP", + AV_PIX_FMT_GBR24P : "GBR24P", + AV_PIX_FMT_GBRP9BE : "GBRP9BE", + AV_PIX_FMT_GBRP9LE : "GBRP9LE", + AV_PIX_FMT_GBRP10BE : "GBRP10BE", + AV_PIX_FMT_GBRP10LE : "GBRP10LE", + AV_PIX_FMT_GBRP16BE : "GBRP16BE", + AV_PIX_FMT_GBRP16LE : "GBRP16LE", + AV_PIX_FMT_YUVA422P : "YUVA422P", + AV_PIX_FMT_YUVA444P : "YUVA444P", + AV_PIX_FMT_YUVA420P9BE : "YUVA420P9BE", + AV_PIX_FMT_YUVA420P9LE : "YUVA420P9LE", + AV_PIX_FMT_YUVA422P9BE : "YUVA422P9BE", + AV_PIX_FMT_YUVA422P9LE : "YUVA422P9LE", + AV_PIX_FMT_YUVA444P9BE : "YUVA444P9BE", + AV_PIX_FMT_YUVA444P9LE : "YUVA444P9LE", + AV_PIX_FMT_YUVA420P10BE : "YUVA420P10BE", + AV_PIX_FMT_YUVA420P10LE : "YUVA420P10LE", + AV_PIX_FMT_YUVA422P10BE : "YUVA422P10BE", + AV_PIX_FMT_YUVA422P10LE : "YUVA422P10LE", + AV_PIX_FMT_YUVA444P10BE : "YUVA444P10BE", + AV_PIX_FMT_YUVA444P10LE : "YUVA444P10LE", + AV_PIX_FMT_YUVA420P16BE : "YUVA420P16BE", + AV_PIX_FMT_YUVA420P16LE : "YUVA420P16LE", + AV_PIX_FMT_YUVA422P16BE : "YUVA422P16BE", + AV_PIX_FMT_YUVA422P16LE : "YUVA422P16LE", + AV_PIX_FMT_YUVA444P16BE : "YUVA444P16BE", + AV_PIX_FMT_YUVA444P16LE : "YUVA444P16LE", + AV_PIX_FMT_VDPAU : "VDPAU", + AV_PIX_FMT_XYZ12LE : "XYZ12LE", + AV_PIX_FMT_XYZ12BE : "XYZ12BE", + AV_PIX_FMT_NV16 : "NV16", + AV_PIX_FMT_NV20LE : "NV20LE", + AV_PIX_FMT_NV20BE : "NV20BE", + AV_PIX_FMT_RGBA64BE : "RGBA64BE", + AV_PIX_FMT_RGBA64LE : "RGBA64LE", + AV_PIX_FMT_BGRA64BE : "BGRA64BE", + AV_PIX_FMT_BGRA64LE : "BGRA64LE", + AV_PIX_FMT_YVYU422 : "YVYU422", + AV_PIX_FMT_YA16BE : "YA16BE", + AV_PIX_FMT_YA16LE : "YA16LE", + AV_PIX_FMT_GBRAP : "GBRAP", + AV_PIX_FMT_GBRAP16BE : "GBRAP16BE", + AV_PIX_FMT_GBRAP16LE : "GBRAP16LE", + AV_PIX_FMT_QSV : "QSV", + AV_PIX_FMT_MMAL : "MMAL", + AV_PIX_FMT_D3D11VA_VLD : "D3D11VA_VLD", + AV_PIX_FMT_CUDA : "CUDA", + AV_PIX_FMT_0RGB : "0RGB", + AV_PIX_FMT_RGB0 : "RGB0", + AV_PIX_FMT_0BGR : "0BGR", + AV_PIX_FMT_BGR0 : "BGR0", + AV_PIX_FMT_YUV420P12BE : "YUV420P12BE", + AV_PIX_FMT_YUV420P12LE : "YUV420P12LE", + AV_PIX_FMT_YUV420P14BE : "YUV420P14BE", + AV_PIX_FMT_YUV420P14LE : "YUV420P14LE", + AV_PIX_FMT_YUV422P12BE : "YUV422P12BE", + AV_PIX_FMT_YUV422P12LE : "YUV422P12LE", + AV_PIX_FMT_YUV422P14BE : "YUV422P14BE", + AV_PIX_FMT_YUV422P14LE : "YUV422P14LE", + AV_PIX_FMT_YUV444P12BE : "YUV444P12BE", + AV_PIX_FMT_YUV444P12LE : "YUV444P12LE", + AV_PIX_FMT_YUV444P14BE : "YUV444P14BE", + AV_PIX_FMT_YUV444P14LE : "YUV444P14LE", + AV_PIX_FMT_GBRP12BE : "GBRP12BE", + AV_PIX_FMT_GBRP12LE : "GBRP12LE", + AV_PIX_FMT_GBRP14BE : "GBRP14BE", + AV_PIX_FMT_GBRP14LE : "GBRP14LE", + AV_PIX_FMT_YUVJ411P : "YUVJ411P", + AV_PIX_FMT_BAYER_BGGR8 : "BAYER_BGGR8", + AV_PIX_FMT_BAYER_RGGB8 : "BAYER_RGGB8", + AV_PIX_FMT_BAYER_GBRG8 : "BAYER_GBRG8", + AV_PIX_FMT_BAYER_GRBG8 : "BAYER_GRBG8", + AV_PIX_FMT_BAYER_BGGR16LE : "BAYER_BGGR16LE", + AV_PIX_FMT_BAYER_BGGR16BE : "BAYER_BGGR16BE", + AV_PIX_FMT_BAYER_RGGB16LE : "BAYER_RGGB16LE", + AV_PIX_FMT_BAYER_RGGB16BE : "BAYER_RGGB16BE", + AV_PIX_FMT_BAYER_GBRG16LE : "BAYER_GBRG16LE", + AV_PIX_FMT_BAYER_GBRG16BE : "BAYER_GBRG16BE", + AV_PIX_FMT_BAYER_GRBG16LE : "BAYER_GRBG16LE", + AV_PIX_FMT_BAYER_GRBG16BE : "BAYER_GRBG16BE", + AV_PIX_FMT_XVMC : "XVMC", + AV_PIX_FMT_YUV440P10LE : "YUV440P10LE", + AV_PIX_FMT_YUV440P10BE : "YUV440P10BE", + AV_PIX_FMT_YUV440P12LE : "YUV440P12LE", + AV_PIX_FMT_YUV440P12BE : "YUV440P12BE", + AV_PIX_FMT_AYUV64LE : "AYUV64LE", + AV_PIX_FMT_AYUV64BE : "AYUV64BE", + AV_PIX_FMT_VIDEOTOOLBOX : "VIDEOTOOLBOX", + AV_PIX_FMT_P010LE : "P010LE", + AV_PIX_FMT_P010BE : "P010BE", + AV_PIX_FMT_GBRAP12BE : "GBRAP12BE", + AV_PIX_FMT_GBRAP12LE : "GBRAP12LE", + AV_PIX_FMT_GBRAP10BE : "GBRAP10BE", + AV_PIX_FMT_GBRAP10LE : "GBRAP10LE", + AV_PIX_FMT_MEDIACODEC : "MEDIACODEC", + AV_PIX_FMT_GRAY12BE : "GRAY12BE", + AV_PIX_FMT_GRAY12LE : "GRAY12LE", + AV_PIX_FMT_GRAY10BE : "GRAY10BE", + AV_PIX_FMT_GRAY10LE : "GRAY10LE", + AV_PIX_FMT_P016LE : "P016LE", + AV_PIX_FMT_P016BE : "P016BE", + AV_PIX_FMT_D3D11 : "D3D11", + AV_PIX_FMT_GRAY9BE : "GRAY9BE", + AV_PIX_FMT_GRAY9LE : "GRAY9LE", + AV_PIX_FMT_GBRPF32BE : "GBRPF32BE", + AV_PIX_FMT_GBRPF32LE : "GBRPF32LE", + AV_PIX_FMT_GBRAPF32BE : "GBRAPF32BE", + AV_PIX_FMT_GBRAPF32LE : "GBRAPF32LE", + AV_PIX_FMT_DRM_PRIME : "DRM_PRIME", + AV_PIX_FMT_OPENCL : "OPENCL", + AV_PIX_FMT_GRAY14BE : "GRAY14BE", + AV_PIX_FMT_GRAY14LE : "GRAY14LE", + AV_PIX_FMT_GRAYF32BE : "GRAYF32BE", + AV_PIX_FMT_GRAYF32LE : "GRAYF32LE", + AV_PIX_FMT_YUVA422P12BE : "YUVA422P12BE", + AV_PIX_FMT_YUVA422P12LE : "YUVA422P12LE", + AV_PIX_FMT_YUVA444P12BE : "YUVA444P12BE", + AV_PIX_FMT_YUVA444P12LE : "YUVA444P12LE", + AV_PIX_FMT_NV24 : "NV24", + AV_PIX_FMT_NV42 : "NV42", + AV_PIX_FMT_VULKAN : "VULKAN", + AV_PIX_FMT_Y210BE : "Y210BE", + AV_PIX_FMT_Y210LE : "Y210LE", + AV_PIX_FMT_NB : "NB", + } + FORMAT_TO_ENUM = { "YUV420P" : AV_PIX_FMT_YUV420P, "YUV422P" : AV_PIX_FMT_YUV422P, @@ -542,7 +942,10 @@ cdef class Decoder: if self.actual_pix_fmt not in ENUM_TO_FORMAT: av_frame_unref(av_frame) av_frame_free(&av_frame) - log.error("unknown output pixel format: %s, expected %s (%s)", self.actual_pix_fmt, self.pix_fmt, self.colorspace) + log.error("unknown output pixel format: %s, expected %s for '%s'", + FORMAT_TO_STR.get(self.actual_pix_fmt, self.actual_pix_fmt), + FORMAT_TO_STR.get(self.pix_fmt, self.pix_fmt), + self.colorspace) return None log("avcodec actual output pixel format is %s (%s), expected %s (%s)", self.actual_pix_fmt, self.get_actual_colorspace(), self.pix_fmt, self.colorspace)