Commit 56123595 authored by Michael Niedermayer's avatar Michael Niedermayer

ffv1: add a minor version field beginning with ffv1.3

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 069cf86d
...@@ -165,6 +165,7 @@ typedef struct FFV1Context{ ...@@ -165,6 +165,7 @@ typedef struct FFV1Context{
uint64_t rc_stat[256][2]; uint64_t rc_stat[256][2];
uint64_t (*rc_stat2[MAX_QUANT_TABLES])[32][2]; uint64_t (*rc_stat2[MAX_QUANT_TABLES])[32][2];
int version; int version;
int minor_version;
int width, height; int width, height;
int chroma_h_shift, chroma_v_shift; int chroma_h_shift, chroma_v_shift;
int chroma_planes; int chroma_planes;
...@@ -778,6 +779,8 @@ static int write_extra_header(FFV1Context *f){ ...@@ -778,6 +779,8 @@ static int write_extra_header(FFV1Context *f){
ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
put_symbol(c, state, f->version, 0); put_symbol(c, state, f->version, 0);
if(f->version > 2)
put_symbol(c, state, f->minor_version, 0);
put_symbol(c, state, f->ac, 0); put_symbol(c, state, f->ac, 0);
if(f->ac>1){ if(f->ac>1){
for(i=1; i<256; i++){ for(i=1; i<256; i++){
...@@ -1543,6 +1546,8 @@ static int read_extra_header(FFV1Context *f){ ...@@ -1543,6 +1546,8 @@ static int read_extra_header(FFV1Context *f){
ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
f->version= get_symbol(c, state, 0); f->version= get_symbol(c, state, 0);
if(f->version > 2)
f->minor_version= get_symbol(c, state, 0);
f->ac= f->avctx->coder_type= get_symbol(c, state, 0); f->ac= f->avctx->coder_type= get_symbol(c, state, 0);
if(f->ac>1){ if(f->ac>1){
for(i=1; i<256; i++){ for(i=1; i<256; i++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment