changeset 34805:0eba64545a27

Improve Avid Meridien (AVUI) decoding with FFmpeg.
author cehoyos
date Tue, 08 May 2012 10:56:22 +0000
parents 664152973dbc
children 5048d421691d
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, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/codec-cfg.c	Tue May 08 10:53:40 2012 +0000
+++ b/codec-cfg.c	Tue May 08 10:56:22 2012 +0000
@@ -190,6 +190,7 @@
     {"444P",        IMGFMT_444P},
     {"444A",        IMGFMT_444A},
     {"422P",        IMGFMT_422P},
+    {"422A",        IMGFMT_422A},
     {"411P",        IMGFMT_411P},
     {"440P",        IMGFMT_440P},
     {"Y800",        IMGFMT_Y800},
--- a/etc/codecs.conf	Tue May 08 10:53:40 2012 +0000
+++ b/etc/codecs.conf	Tue May 08 10:56:22 2012 +0000
@@ -3144,6 +3144,14 @@
   dll "dnxhd"
   out 422P
 
+videocodec ffavui
+  info "FFmpeg Avid Meridien"
+  status working
+  fourcc AVUI
+  driver ffmpeg
+  dll avui
+  out 422A
+
 ; quicktime codecs:
 
 videocodec qtm100
--- a/fmt-conversion.c	Tue May 08 10:53:40 2012 +0000
+++ b/fmt-conversion.c	Tue May 08 10:56:22 2012 +0000
@@ -65,6 +65,7 @@
     {IMGFMT_RGBA,    PIX_FMT_RGB0},
     {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
     {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
+    {IMGFMT_422A,    PIX_FMT_YUVA422P},
     {IMGFMT_444A,    PIX_FMT_YUVA444P},
 #endif
 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
--- a/libmpcodecs/img_format.c	Tue May 08 10:53:40 2012 +0000
+++ b/libmpcodecs/img_format.c	Tue May 08 10:56:22 2012 +0000
@@ -83,6 +83,7 @@
     case IMGFMT_444P: return "Planar 444P";
     case IMGFMT_444A: return "Planar 444P with alpha";
     case IMGFMT_422P: return "Planar 422P";
+    case IMGFMT_422A: return "Planar 422P with alpha";
     case IMGFMT_411P: return "Planar 411P";
     case IMGFMT_NV12: return "Planar NV12";
     case IMGFMT_NV21: return "Planar NV21";
@@ -179,6 +180,10 @@
         xs = 0;
         ys = 0;
         break;
+    case IMGFMT_422A:
+        xs = 1;
+        ys = 0;
+        break;
     case IMGFMT_420A:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
@@ -204,7 +209,7 @@
     if (y_shift) *y_shift = ys;
     if (component_bits) *component_bits = bits;
     bpp = 8 + ((16 >> xs) >> ys);
-    if (format == IMGFMT_420A || format == IMGFMT_444A)
+    if (format == IMGFMT_420A || format == IMGFMT_422A || format == IMGFMT_444A)
         bpp += 8;
     bpp *= (bits + 7) >> 3;
     return err ? 0 : bpp;
--- a/libmpcodecs/img_format.h	Tue May 08 10:53:40 2012 +0000
+++ b/libmpcodecs/img_format.h	Tue May 08 10:56:22 2012 +0000
@@ -126,6 +126,8 @@
 
 // 4:2:0 planar with alpha
 #define IMGFMT_420A 0x41303234
+// 4:2:2 planar with alpha
+#define IMGFMT_422A 0x41323234
 // 4:4:4 planar with alpha
 #define IMGFMT_444A 0x41343434
 
--- a/libmpcodecs/mp_image.c	Tue May 08 10:53:40 2012 +0000
+++ b/libmpcodecs/mp_image.c	Tue May 08 10:56:22 2012 +0000
@@ -141,6 +141,7 @@
     case IMGFMT_YV12:
         return;
     case IMGFMT_420A:
+    case IMGFMT_422A:
     case IMGFMT_444A:
     case IMGFMT_IF09:
         mpi->num_planes=4;
--- a/libmpcodecs/vf_scale.c	Tue May 08 10:53:40 2012 +0000
+++ b/libmpcodecs/vf_scale.c	Tue May 08 10:56:22 2012 +0000
@@ -88,6 +88,7 @@
     IMGFMT_420P9_LE,
     IMGFMT_420P9_BE,
     IMGFMT_420A,
+    IMGFMT_422A,
     IMGFMT_444A,
     IMGFMT_IYUV,
     IMGFMT_YVU9,
--- a/m_option.c	Tue May 08 10:53:40 2012 +0000
+++ b/m_option.c	Tue May 08 10:56:22 2012 +0000
@@ -1099,6 +1099,7 @@
   {"420p10",   IMGFMT_420P10},
   {"420p9",    IMGFMT_420P9},
   {"444a", IMGFMT_444A},
+  {"422a", IMGFMT_422A},
   {"420a", IMGFMT_420A},
   {"444p", IMGFMT_444P},
   {"422p", IMGFMT_422P},