[FFmpeg-cvslog] ffv1: Store a flag in the global header that indicates if all frames are keyframes

Michael Niedermayer git at videolan.org
Sat Apr 27 16:31:07 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 27 16:04:25 2013 +0200| [1a392fc550fde58948bd7b188c7a98d534aefadb] | committer: Michael Niedermayer

ffv1: Store a flag in the global header that indicates if all frames are keyframes

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1.h    |    1 +
 libavcodec/ffv1dec.c |    2 ++
 libavcodec/ffv1enc.c |    3 ++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h
index 23633c9..9810047 100644
--- a/libavcodec/ffv1.h
+++ b/libavcodec/ffv1.h
@@ -106,6 +106,7 @@ typedef struct FFV1Context {
     int16_t *sample_buffer;
 
     int ec;
+    int intra;
     int slice_damaged;
     int key_frame_ok;
 
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6082507..c4e8f9b 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -498,6 +498,8 @@ static int read_extra_header(FFV1Context *f)
 
     if (f->version > 2) {
         f->ec = get_symbol(c, state, 0);
+        if (f->minor_version > 2)
+            f->intra = get_symbol(c, state, 0);
     }
 
     if (f->version > 2) {
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 70fcd65..d897dc4 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -534,7 +534,7 @@ static int write_extradata(FFV1Context *f)
     put_symbol(c, state, f->version, 0);
     if (f->version > 2) {
         if (f->version == 3)
-            f->minor_version = 2;
+            f->minor_version = 3;
         put_symbol(c, state, f->minor_version, 0);
     }
 
@@ -575,6 +575,7 @@ 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);
     }
 
     f->avctx->extradata_size = ff_rac_terminate(c);



More information about the ffmpeg-cvslog mailing list