[FFmpeg-cvslog] Add an ARES atom to extradata when encoding avui.

Carl Eugen Hoyos git at videolan.org
Thu Jan 29 03:18:08 CET 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jan 29 01:07:08 2015 +0100| [3ea97767e49c599813d6a09c640a657d71c1a0de] | committer: Carl Eugen Hoyos

Add an ARES atom to extradata when encoding avui.

Allows playback with QuickTime and the original codec.

Tested by Olaf Matthes, olaf matthes gmx de

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

 libavcodec/avuienc.c              |    9 +++++++--
 libavcodec/version.h              |    2 +-
 tests/ref/vsynth/vsynth1-avui     |    4 ++--
 tests/ref/vsynth/vsynth2-avui     |    4 ++--
 tests/ref/vsynth/vsynth_lena-avui |    4 ++--
 5 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c
index db640bb..4b1b408 100644
--- a/libavcodec/avuienc.c
+++ b/libavcodec/avuienc.c
@@ -22,6 +22,7 @@
 
 #include "avcodec.h"
 #include "internal.h"
+#include "libavutil/intreadwrite.h"
 
 static av_cold int avui_encode_init(AVCodecContext *avctx)
 {
@@ -29,15 +30,19 @@ static av_cold int avui_encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
         return AVERROR(EINVAL);
     }
-    if (!(avctx->extradata = av_mallocz(24 + FF_INPUT_BUFFER_PADDING_SIZE)))
+    if (!(avctx->extradata = av_mallocz(144 + FF_INPUT_BUFFER_PADDING_SIZE)))
         return AVERROR(ENOMEM);
-    avctx->extradata_size = 24;
+    avctx->extradata_size = 144;
     memcpy(avctx->extradata, "\0\0\0\x18""APRGAPRG0001", 16);
     if (avctx->field_order > AV_FIELD_PROGRESSIVE) {
         avctx->extradata[19] = 2;
     } else {
         avctx->extradata[19] = 1;
     }
+    memcpy(avctx->extradata + 24, "\0\0\0\x78""ARESARES0001""\0\0\0\x98", 20);
+    AV_WB32(avctx->extradata + 44, avctx->width);
+    AV_WB32(avctx->extradata + 48, avctx->height);
+    memcpy(avctx->extradata + 52, "\0\0\0\x1\0\0\0\x20\0\0\0\x2", 12);
 
     avctx->coded_frame = av_frame_alloc();
     if (!avctx->coded_frame) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index dfb95e0..3827c38 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 56
 #define LIBAVCODEC_VERSION_MINOR  21
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
diff --git a/tests/ref/vsynth/vsynth1-avui b/tests/ref/vsynth/vsynth1-avui
index 53591e1..1f08053 100644
--- a/tests/ref/vsynth/vsynth1-avui
+++ b/tests/ref/vsynth/vsynth1-avui
@@ -1,4 +1,4 @@
-87ef06cbd15934c282d4aa83e2a5cf0a *tests/data/fate/vsynth1-avui.mov
-42624917 tests/data/fate/vsynth1-avui.mov
+25ef49e1aee0b20d4feee89b8dc093b4 *tests/data/fate/vsynth1-avui.mov
+42625037 tests/data/fate/vsynth1-avui.mov
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-avui.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-avui b/tests/ref/vsynth/vsynth2-avui
index 1500386..2423916 100644
--- a/tests/ref/vsynth/vsynth2-avui
+++ b/tests/ref/vsynth/vsynth2-avui
@@ -1,4 +1,4 @@
-4d46be4cf21d2f0dc0a857bb2603b899 *tests/data/fate/vsynth2-avui.mov
-42624917 tests/data/fate/vsynth2-avui.mov
+8f6ab410bb6b5dc4599e12968dbd0366 *tests/data/fate/vsynth2-avui.mov
+42625037 tests/data/fate/vsynth2-avui.mov
 36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-avui.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth_lena-avui b/tests/ref/vsynth/vsynth_lena-avui
index 02154a6..c2fced8 100644
--- a/tests/ref/vsynth/vsynth_lena-avui
+++ b/tests/ref/vsynth/vsynth_lena-avui
@@ -1,4 +1,4 @@
-df5efcfd2170df82e466be4deb7ce4a9 *tests/data/fate/vsynth_lena-avui.mov
-42624917 tests/data/fate/vsynth_lena-avui.mov
+26805e15d9e732cd24aea91ae564d5c3 *tests/data/fate/vsynth_lena-avui.mov
+42625037 tests/data/fate/vsynth_lena-avui.mov
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-avui.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list