diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-21 21:48:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-21 22:57:54 +0200 |
commit | 1e7008675b2d930955b0295808ef208d92e5639d (patch) | |
tree | 7613e4d48a8d265373b678fe709ec81ab3d1d308 /libavcodec/libvpx.c | |
parent | 30e9ebb14f197bbc3fcbde467da39d1a79ac8d52 (diff) | |
parent | 8655c54160767de1a6b96f8bc310d6e4eaceff48 (diff) | |
download | ffmpeg-1e7008675b2d930955b0295808ef208d92e5639d.tar.gz |
Merge commit '8655c54160767de1a6b96f8bc310d6e4eaceff48'
* commit '8655c54160767de1a6b96f8bc310d6e4eaceff48':
libvpx: Support the vp9 extended profiles
Conflicts:
Changelog
configure
libavcodec/libvpx.c
libavcodec/libvpx.h
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/version.h
mostly not merged, as requested by jamrial
See: 01e59d48ed1a41b88107ed1d4d56ae0cbcd1a60e
See: 079b7f6eacc09bc2813fc1ddc230ab05022b69c2 and others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libvpx.c')
-rw-r--r-- | libavcodec/libvpx.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c index e0f9df3caa..602eb70f45 100644 --- a/libavcodec/libvpx.c +++ b/libavcodec/libvpx.c @@ -77,3 +77,60 @@ av_cold void ff_vp9_init_static(AVCodec *codec) } #endif } +#if 0 +enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img) +{ + switch (img) { + case VPX_IMG_FMT_RGB24: return AV_PIX_FMT_RGB24; + case VPX_IMG_FMT_RGB565: return AV_PIX_FMT_RGB565BE; + case VPX_IMG_FMT_RGB555: return AV_PIX_FMT_RGB555BE; + case VPX_IMG_FMT_UYVY: return AV_PIX_FMT_UYVY422; + case VPX_IMG_FMT_YUY2: return AV_PIX_FMT_YUYV422; + case VPX_IMG_FMT_YVYU: return AV_PIX_FMT_YVYU422; + case VPX_IMG_FMT_BGR24: return AV_PIX_FMT_BGR24; + case VPX_IMG_FMT_ARGB: return AV_PIX_FMT_ARGB; + case VPX_IMG_FMT_ARGB_LE: return AV_PIX_FMT_BGRA; + case VPX_IMG_FMT_RGB565_LE: return AV_PIX_FMT_RGB565LE; + case VPX_IMG_FMT_RGB555_LE: return AV_PIX_FMT_RGB555LE; + case VPX_IMG_FMT_I420: return AV_PIX_FMT_YUV420P; + case VPX_IMG_FMT_I422: return AV_PIX_FMT_YUV422P; + case VPX_IMG_FMT_I444: return AV_PIX_FMT_YUV444P; + case VPX_IMG_FMT_444A: return AV_PIX_FMT_YUVA444P; +#ifdef VPX_IMAGE_ABI_VERSION >= 3 + case VPX_IMG_FMT_I440: return AV_PIX_FMT_YUV440P; + case VPX_IMG_FMT_I42016: return AV_PIX_FMT_YUV420P16BE; + case VPX_IMG_FMT_I42216: return AV_PIX_FMT_YUV422P16BE; + case VPX_IMG_FMT_I44416: return AV_PIX_FMT_YUV444P16BE; +#endif + default: return AV_PIX_FMT_NONE; + } +} + +vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix) +{ + switch (pix) { + case AV_PIX_FMT_RGB24: return VPX_IMG_FMT_RGB24; + case AV_PIX_FMT_RGB565BE: return VPX_IMG_FMT_RGB565; + case AV_PIX_FMT_RGB555BE: return VPX_IMG_FMT_RGB555; + case AV_PIX_FMT_UYVY422: return VPX_IMG_FMT_UYVY; + case AV_PIX_FMT_YUYV422: return VPX_IMG_FMT_YUY2; + case AV_PIX_FMT_YVYU422: return VPX_IMG_FMT_YVYU; + case AV_PIX_FMT_BGR24: return VPX_IMG_FMT_BGR24; + case AV_PIX_FMT_ARGB: return VPX_IMG_FMT_ARGB; + case AV_PIX_FMT_BGRA: return VPX_IMG_FMT_ARGB_LE; + case AV_PIX_FMT_RGB565LE: return VPX_IMG_FMT_RGB565_LE; + case AV_PIX_FMT_RGB555LE: return VPX_IMG_FMT_RGB555_LE; + case AV_PIX_FMT_YUV420P: return VPX_IMG_FMT_I420; + case AV_PIX_FMT_YUV422P: return VPX_IMG_FMT_I422; + case AV_PIX_FMT_YUV444P: return VPX_IMG_FMT_I444; + case AV_PIX_FMT_YUVA444P: return VPX_IMG_FMT_444A; +#ifdef VPX_IMAGE_ABI_VERSION >= 3 + case AV_PIX_FMT_YUV440P: return VPX_IMG_FMT_I440; + case AV_PIX_FMT_YUV420P16BE: return VPX_IMG_FMT_I42016; + case AV_PIX_FMT_YUV422P16BE: return VPX_IMG_FMT_I42216; + case AV_PIX_FMT_YUV444P16BE: return VPX_IMG_FMT_I44416; +#endif + default: return VPX_IMG_FMT_NONE; + } +} +#endif |