[FFmpeg-devel] [PATCH] avcodec/ffv1enc: Store the picture dimensions in v3.5+
Michael Niedermayer
michaelni at gmx.at
Mon Apr 27 02:06:38 CEST 2015
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/ffv1enc.c | 6 ++++--
tests/ref/seek/vsynth_lena-ffv1 | 40 ++++++++++++++++++-------------------
tests/ref/vsynth/vsynth1-ffv1 | 4 ++--
tests/ref/vsynth/vsynth2-ffv1 | 4 ++--
tests/ref/vsynth/vsynth3-ffv1 | 4 ++--
tests/ref/vsynth/vsynth_lena-ffv1 | 4 ++--
6 files changed, 32 insertions(+), 30 deletions(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index af727a5..e559029 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -559,9 +559,9 @@ static int write_extradata(FFV1Context *f)
put_symbol(c, state, f->version, 0);
if (f->version > 2) {
if (f->version == 3) {
- f->micro_version = 4;
+ f->micro_version = 5;
} else if (f->version == 4)
- f->micro_version = 2;
+ f->micro_version = 3;
put_symbol(c, state, f->micro_version, 0);
}
@@ -603,6 +603,8 @@ static int write_extradata(FFV1Context *f)
if (f->version > 2) {
put_symbol(c, state, f->ec, 0);
put_symbol(c, state, f->intra = (f->avctx->gop_size < 2), 0);
+ put_symbol(c, state, f->width, 0);
+ put_symbol(c, state, f->height, 0);
}
f->avctx->extradata_size = ff_rac_terminate(c);
diff --git a/tests/ref/seek/vsynth_lena-ffv1 b/tests/ref/seek/vsynth_lena-ffv1
index 5758368..17958d4 100644
--- a/tests/ref/seek/vsynth_lena-ffv1
+++ b/tests/ref/seek/vsynth_lena-ffv1
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499446 size: 75965
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631578 size: 72710
ret:-1 st: 0 flags:1 ts:-0.320000
ret:-1 st:-1 flags:0 ts: 2.576668
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499446 size: 75965
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801642 size: 69485
ret:-1 st: 0 flags:1 ts:-0.760000
ret:-1 st:-1 flags:0 ts: 2.153336
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631578 size: 72710
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393898 size: 77489
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393898 size: 77489
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801642 size: 69485
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393898 size: 77489
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499446 size: 75965
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5698 size: 71707
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393898 size: 77489
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631578 size: 72710
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499446 size: 75965
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801642 size: 69485
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/vsynth/vsynth1-ffv1 b/tests/ref/vsynth/vsynth1-ffv1
index 001f10a..046b7c7 100644
--- a/tests/ref/vsynth/vsynth1-ffv1
+++ b/tests/ref/vsynth/vsynth1-ffv1
@@ -1,4 +1,4 @@
-26b1296a0ef80a3b5c8b63cc57c52bc2 *tests/data/fate/vsynth1-ffv1.avi
-2691268 tests/data/fate/vsynth1-ffv1.avi
+71dff74a0056c2a79ac1cbaf0c89e39c *tests/data/fate/vsynth1-ffv1.avi
+2691272 tests/data/fate/vsynth1-ffv1.avi
c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-ffv1 b/tests/ref/vsynth/vsynth2-ffv1
index b38bb38..c8eadff 100644
--- a/tests/ref/vsynth/vsynth2-ffv1
+++ b/tests/ref/vsynth/vsynth2-ffv1
@@ -1,4 +1,4 @@
-6d7b6352f49e21153bb891df411e60ec *tests/data/fate/vsynth2-ffv1.avi
-3718026 tests/data/fate/vsynth2-ffv1.avi
+245907e3659b8f90fefb81885be3b471 *tests/data/fate/vsynth2-ffv1.avi
+3718030 tests/data/fate/vsynth2-ffv1.avi
36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ffv1.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-ffv1 b/tests/ref/vsynth/vsynth3-ffv1
index 8ffdd3f..a11a70e 100644
--- a/tests/ref/vsynth/vsynth3-ffv1
+++ b/tests/ref/vsynth/vsynth3-ffv1
@@ -1,4 +1,4 @@
-f969ca8542c8384c27233f362b661f8a *tests/data/fate/vsynth3-ffv1.avi
-62194 tests/data/fate/vsynth3-ffv1.avi
+733efc91187c51f5b4011582bb339ed3 *tests/data/fate/vsynth3-ffv1.avi
+62198 tests/data/fate/vsynth3-ffv1.avi
a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-ffv1.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-ffv1 b/tests/ref/vsynth/vsynth_lena-ffv1
index 4060d8e..bd6a5ca 100644
--- a/tests/ref/vsynth/vsynth_lena-ffv1
+++ b/tests/ref/vsynth/vsynth_lena-ffv1
@@ -1,4 +1,4 @@
-ed72c22374718589ffacd7ea15424687 *tests/data/fate/vsynth_lena-ffv1.avi
-3547792 tests/data/fate/vsynth_lena-ffv1.avi
+7ab9ba74e5fa8178996760da0e5560e6 *tests/data/fate/vsynth_lena-ffv1.avi
+3547796 tests/data/fate/vsynth_lena-ffv1.avi
dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-ffv1.out.rawvideo
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
--
1.7.9.5
More information about the ffmpeg-devel
mailing list