[FFmpeg-cvslog] libvpx: Enable vp9 alpha encoding

Vignesh Venkatasubramanian git at videolan.org
Wed Jul 13 08:34:59 CEST 2016


ffmpeg | branch: master | Vignesh Venkatasubramanian <vigneshv-at-google.com at ffmpeg.org> | Thu Jun 30 16:16:31 2016 -0700| [acca56d9629b7fc158ce188190d22314c3d92c39] | committer: James Zern

libvpx: Enable vp9 alpha encoding

Chrome canary now supports decoding of VP9 streams with alpha
channel [1]. Add support to ffmpeg for creating such files.

[1] https://codereview.chromium.org/2096813002/

Reviewed-by: James Zern <jzern at google.com>
Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=acca56d9629b7fc158ce188190d22314c3d92c39
---

 libavcodec/libvpx.c    |    3 +++
 libavcodec/libvpxenc.c |    1 +
 2 files changed, 4 insertions(+)

diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c
index 55edc7e..1eca97a 100644
--- a/libavcodec/libvpx.c
+++ b/libavcodec/libvpx.c
@@ -29,12 +29,14 @@
 
 static const enum AVPixelFormat vp9_pix_fmts_def[] = {
     AV_PIX_FMT_YUV420P,
+    AV_PIX_FMT_YUVA420P,
     AV_PIX_FMT_NONE
 };
 
 #if CONFIG_LIBVPX_VP9_ENCODER
 static const enum AVPixelFormat vp9_pix_fmts_highcol[] = {
     AV_PIX_FMT_YUV420P,
+    AV_PIX_FMT_YUVA420P,
     AV_PIX_FMT_YUV422P,
     AV_PIX_FMT_YUV440P,
     AV_PIX_FMT_YUV444P,
@@ -46,6 +48,7 @@ static const enum AVPixelFormat vp9_pix_fmts_highcol[] = {
 
 static const enum AVPixelFormat vp9_pix_fmts_highbd[] = {
     AV_PIX_FMT_YUV420P,
+    AV_PIX_FMT_YUVA420P,
     AV_PIX_FMT_YUV422P,
     AV_PIX_FMT_YUV440P,
     AV_PIX_FMT_YUV444P,
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 4ea932d..c5b1b86 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -284,6 +284,7 @@ static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
 #endif
     switch (avctx->pix_fmt) {
     case AV_PIX_FMT_YUV420P:
+    case AV_PIX_FMT_YUVA420P:
         enccfg->g_profile = 0;
         *img_fmt = VPX_IMG_FMT_I420;
         return 0;



More information about the ffmpeg-cvslog mailing list