From 0f13cd3187192ba0cc2b043430de6e279e7b97c3 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 19 Oct 2012 12:14:22 +0200 Subject: ffv1: update to ffv1 version 3 Based on code from Carl Eugen Hoyos, Michael Niedermayer and Paul B Mahol. --- libavcodec/ffv1.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'libavcodec/ffv1.h') diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index 7676c61be3..74f1159537 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -1,7 +1,7 @@ /* * FFV1 codec for libavcodec * - * Copyright (c) 2012 Michael Niedermayer + * Copyright (c) 2003-2012 Michael Niedermayer * * This file is part of Libav. * @@ -57,6 +57,7 @@ typedef struct PlaneContext { #define MAX_SLICES 256 typedef struct FFV1Context { + AVClass *class; AVCodecContext *avctx; RangeCoder c; GetBitContext gb; @@ -64,13 +65,17 @@ typedef struct FFV1Context { uint64_t rc_stat[256][2]; uint64_t (*rc_stat2[MAX_QUANT_TABLES])[32][2]; int version; + int minor_version; int width, height; + int chroma_planes; int chroma_h_shift, chroma_v_shift; + int transparency; int flags; int picture_number; - AVFrame picture; + AVFrame picture, last_picture; int plane_count; int ac; // 1 = range coder <-> 0 = golomb rice + int ac_byte_count; // number of bytes used for AC coding PlaneContext plane[MAX_PLANES]; int16_t quant_table[MAX_CONTEXT_INPUTS][256]; int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][256]; @@ -80,8 +85,15 @@ typedef struct FFV1Context { int run_index; int colorspace; int16_t *sample_buffer; - int gob_count; + int ec; + int slice_damaged; + int key_frame_ok; + + int bits_per_raw_sample; + int packed_at_lsb; + + int gob_count; int quant_table_count; DSPContext dsp; @@ -175,10 +187,10 @@ static inline void update_vlc_state(VlcState *const state, const int v) } int ffv1_common_init(AVCodecContext *avctx); -int ffv1_init_slice_state(FFV1Context *f); +int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs); int ffv1_init_slice_contexts(FFV1Context *f); int ffv1_allocate_initial_states(FFV1Context *f); -void ffv1_clear_state(FFV1Context *f); +void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs); int ffv1_close(AVCodecContext *avctx); #endif /* AVCODEC_FFV1_H */ -- cgit v1.2.3