OSDN Git Service

ffv1: Explicitly name the coder type
authorVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 15 Nov 2015 22:26:07 +0000 (23:26 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 16 Nov 2015 11:56:31 +0000 (12:56 +0100)
commit4bb1070c154e49d35805fbcdac9c9e92f702ef96
tree8feca3a3ab44d19cab72718c24bddb803bd12ce4
parent9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c
ffv1: Explicitly name the coder type

FFv1 uses two types of coders, golomb and range with two different
tables. This is exposed this in a rather convoluted way, for example
mentioning to set coder type 1 while initializing the variable 'ac' to 2,
because encoder does not use range coder with default table.

Appropriate internal coder type values have been added and used in any
check rather than using raw numbers.

Initialization of avctx.coder_type in ffv1dec is removed because this
field is encoder only. An unneeded validation check in the encoder
is dropped too.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/ffv1.c
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c