aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dv.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-06-18 10:59:37 +0200
committerAnton Khirnov <anton@khirnov.net>2014-06-20 14:15:31 +0200
commit650dee63c8b1e6693c6cf5983f4a5ed3f571379f (patch)
tree04b514b5fe495363fcd444dc4cb2606f64b249a1 /libavcodec/dv.h
parent778111592bf5f38630858ee6dfcfd097cd6c6da9 (diff)
downloadffmpeg-650dee63c8b1e6693c6cf5983f4a5ed3f571379f.tar.gz
dv: get rid of global non-const tables
Instead, store them in the context and compute on each parameter change.
Diffstat (limited to 'libavcodec/dv.h')
-rw-r--r--libavcodec/dv.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/dv.h b/libavcodec/dv.h
index 01a4eec49a..f4047a41cc 100644
--- a/libavcodec/dv.h
+++ b/libavcodec/dv.h
@@ -32,6 +32,11 @@
#include "get_bits.h"
#include "dv_profile.h"
+typedef struct DVwork_chunk {
+ uint16_t buf_offset;
+ uint16_t mb_coordinates[5];
+} DVwork_chunk;
+
typedef struct DVVideoContext {
const DVprofile *sys;
AVFrame *frame;
@@ -44,6 +49,8 @@ typedef struct DVVideoContext {
void (*fdct[2])(int16_t *block);
void (*idct_put[2])(uint8_t *dest, int line_size, int16_t *block);
me_cmp_func ildct_cmp;
+ DVwork_chunk work_chunks[4 * 12 * 27];
+ uint32_t idct_factor[2 * 4 * 16 * 64];
} DVVideoContext;
enum dv_section_type {
@@ -91,7 +98,7 @@ enum dv_pack_type {
extern RL_VLC_ELEM ff_dv_rl_vlc[1184];
-int ff_dv_init_dynamic_tables(const DVprofile *d);
+int ff_dv_init_dynamic_tables(DVVideoContext *s, const DVprofile *d);
int ff_dvvideo_init(AVCodecContext *avctx);
static inline int dv_work_pool_size(const DVprofile *d)