[FFmpeg-cvslog] Support 64bit pam decoding.

Carl Eugen Hoyos git at videolan.org
Tue Jan 17 00:42:15 CET 2012


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Jan 17 00:38:54 2012 +0100| [00430075bd0f06e4c6d9612f3a522255155b035b] | committer: Carl Eugen Hoyos

Support 64bit pam decoding.

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

 libavcodec/pnm.c    |    3 +--
 libavcodec/pnmdec.c |    5 +++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 1defbc2..212ec06 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -131,8 +131,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
             if (maxval < 256) {
                 avctx->pix_fmt = PIX_FMT_RGB32;
             } else {
-                av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth\n");
-                return -1;
+                avctx->pix_fmt = PIX_FMT_RGBA64BE;
             }
         } else {
             return -1;
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index ee15126..4060c4e 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -58,6 +58,11 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
     switch (avctx->pix_fmt) {
     default:
         return -1;
+    case PIX_FMT_RGBA64BE:
+        n = avctx->width * 8;
+        components=4;
+        sample_len=16;
+        goto do_read;
     case PIX_FMT_RGB48BE:
         n = avctx->width * 6;
         components=3;



More information about the ffmpeg-cvslog mailing list