[FFmpeg-cvslog] lavc/pamenc: Support encoding ya16be.

Carl Eugen Hoyos git at videolan.org
Thu Jan 22 04:44:28 CET 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jan 22 01:47:54 2015 +0100| [196dd72bcfe073a77be5fd55a69de61d54a3a2dc] | committer: Carl Eugen Hoyos

lavc/pamenc: Support encoding ya16be.

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

 libavcodec/pamenc.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 64ab2b5..7a51fe6 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -57,6 +57,12 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         maxval     = 255;
         tuple_type = "GRAYSCALE_ALPHA";
         break;
+    case AV_PIX_FMT_YA16BE:
+        n          = w * 4;
+        depth      = 2;
+        maxval     = 0xFFFF;
+        tuple_type = "GRAYSCALE_ALPHA";
+        break;
     case AV_PIX_FMT_RGB24:
         n          = w * 3;
         depth      = 3;
@@ -148,6 +154,10 @@ AVCodec ff_pam_encoder = {
     .close          = pam_encode_close,
     .encode2        = pam_encode_frame,
     .pix_fmts       = (const enum AVPixelFormat[]){
-        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
+        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
+        AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE,
+        AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
+        AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
+        AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
     },
 };



More information about the ffmpeg-cvslog mailing list