changeset 34565:25acb5f98cb4

Support v408 and AYUV decoding via FFmpeg.
author cehoyos
date Sun, 05 Feb 2012 21:20:51 +0000
parents 96019b1174b8
children f3d53cd55376
files codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.c libmpcodecs/vf_scale.c m_option.c
diffstat 8 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/codec-cfg.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/codec-cfg.c	Sun Feb 05 21:20:51 2012 +0000
@@ -188,6 +188,7 @@
     {"420P9",       IMGFMT_420P9},
     {"420A",        IMGFMT_420A},
     {"444P",        IMGFMT_444P},
+    {"444A",        IMGFMT_444A},
     {"422P",        IMGFMT_422P},
     {"411P",        IMGFMT_411P},
     {"440P",        IMGFMT_440P},
--- a/etc/codecs.conf	Fri Feb 03 23:11:48 2012 +0000
+++ b/etc/codecs.conf	Sun Feb 05 21:20:51 2012 +0000
@@ -234,6 +234,22 @@
   dll v308
   out 444P
 
+videocodec ffv408
+  info "FFmpeg Quicktime v408 packed 4:4:4:4"
+  status working
+  fourcc v408
+  driver ffmpeg
+  dll v408
+  out 444A
+
+videocodec ffayuv
+  info "FFmpeg Microsoft ayuv packed 4:4:4:4"
+  status working
+  fourcc AYUV
+  driver ffmpeg
+  dll ayuv
+  out 444A
+
 videocodec ffyuv4
   info "FFmpeg libquicktime yuv4 packed 4:2:0"
   status working
--- a/fmt-conversion.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/fmt-conversion.c	Sun Feb 05 21:20:51 2012 +0000
@@ -63,6 +63,7 @@
     {IMGFMT_BGR32,   PIX_FMT_0RGB32},
     {IMGFMT_BGRA,    PIX_FMT_BGR0},
     {IMGFMT_RGBA,    PIX_FMT_RGB0},
+    {IMGFMT_444A,    PIX_FMT_YUVA444P},
 #endif
 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
     {IMGFMT_GBR24P,  PIX_FMT_GBRP},
--- a/libmpcodecs/img_format.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/libmpcodecs/img_format.c	Sun Feb 05 21:20:51 2012 +0000
@@ -79,6 +79,7 @@
     case IMGFMT_444P9_BE:  return "Planar 444P 9-bit big-endian";
     case IMGFMT_420A: return "Planar 420P with alpha";
     case IMGFMT_444P: return "Planar 444P";
+    case IMGFMT_444A: return "Planar 444P with alpha";
     case IMGFMT_422P: return "Planar 422P";
     case IMGFMT_411P: return "Planar 411P";
     case IMGFMT_NV12: return "Planar NV12";
@@ -172,6 +173,10 @@
             break;
         }
     } else switch (format) {
+    case IMGFMT_444A:
+        xs = 0;
+        ys = 0;
+        break;
     case IMGFMT_420A:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
@@ -197,7 +202,7 @@
     if (y_shift) *y_shift = ys;
     if (component_bits) *component_bits = bits;
     bpp = 8 + ((16 >> xs) >> ys);
-    if (format == IMGFMT_420A)
+    if (format == IMGFMT_420A || format == IMGFMT_444A)
         bpp += 8;
     bpp *= (bits + 7) >> 3;
     return err ? 0 : bpp;
--- a/libmpcodecs/img_format.h	Fri Feb 03 23:11:48 2012 +0000
+++ b/libmpcodecs/img_format.h	Sun Feb 05 21:20:51 2012 +0000
@@ -122,6 +122,8 @@
 
 // 4:2:0 planar with alpha
 #define IMGFMT_420A 0x41303234
+// 4:4:4 planar with alpha
+#define IMGFMT_444A 0x41343434
 
 #define IMGFMT_444P16_LE 0x51343434
 #define IMGFMT_444P16_BE 0x34343451
--- a/libmpcodecs/mp_image.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/libmpcodecs/mp_image.c	Sun Feb 05 21:20:51 2012 +0000
@@ -141,6 +141,7 @@
     case IMGFMT_YV12:
         return;
     case IMGFMT_420A:
+    case IMGFMT_444A:
     case IMGFMT_IF09:
         mpi->num_planes=4;
     case IMGFMT_YVU9:
--- a/libmpcodecs/vf_scale.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/libmpcodecs/vf_scale.c	Sun Feb 05 21:20:51 2012 +0000
@@ -88,6 +88,7 @@
     IMGFMT_420P9_LE,
     IMGFMT_420P9_BE,
     IMGFMT_420A,
+    IMGFMT_444A,
     IMGFMT_IYUV,
     IMGFMT_YVU9,
     IMGFMT_IF09,
--- a/m_option.c	Fri Feb 03 23:11:48 2012 +0000
+++ b/m_option.c	Sun Feb 05 21:20:51 2012 +0000
@@ -1098,6 +1098,7 @@
   {"420p16",   IMGFMT_420P16},
   {"420p10",   IMGFMT_420P10},
   {"420p9",    IMGFMT_420P9},
+  {"444a", IMGFMT_444A},
   {"420a", IMGFMT_420A},
   {"444p", IMGFMT_444P},
   {"422p", IMGFMT_422P},