X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fffv1.h;h=5c3bdc1dbfdbd4ee8a54aec168d352eda12bfb40;hb=45ce880a9b3e50cfa088f111dffaf8685bd7bc6b;hp=7676c61be35895b8b3cb667150bdbce54fce7cc8;hpb=71f7b22dba60524b2285643ae0b49d8f64977129;p=ffmpeg diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index 7676c61be35..5c3bdc1dbfd 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. * @@ -22,7 +22,13 @@ #ifndef AVCODEC_FFV1_H #define AVCODEC_FFV1_H + +#include + #include "avcodec.h" +#include "get_bits.h" +#include "put_bits.h" +#include "rangecoder.h" #define MAX_PLANES 4 #define CONTEXT_SIZE 32 @@ -57,6 +63,7 @@ typedef struct PlaneContext { #define MAX_SLICES 256 typedef struct FFV1Context { + AVClass *class; AVCodecContext *avctx; RangeCoder c; GetBitContext gb; @@ -64,13 +71,20 @@ 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 *frame; + AVFrame *last_picture; + + AVFrame *cur; 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,11 +94,16 @@ typedef struct FFV1Context { int run_index; int colorspace; int16_t *sample_buffer; - int gob_count; - int quant_table_count; + int ec; + int slice_damaged; + int key_frame_ok; + + int bits_per_raw_sample; + int packed_at_lsb; - DSPContext dsp; + int gob_count; + int quant_table_count; struct FFV1Context *slice_context[MAX_SLICES]; int slice_count; @@ -175,10 +194,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 */