Mercurial > libavcodec.hg
comparison vp56.h @ 11665:85ee3d14b906 libavcodec
VP56: move vp56_edge_filter to new VP56DSPContext
Using macro templates allows the vp[56]_adjust functions to be
inlined instead of called through function pointers. The new
function pointers enable optimised implementations of the filters.
4% faster VP6 decoding on Cortex-A8.
author | mru |
---|---|
date | Fri, 30 Apr 2010 21:30:22 +0000 |
parents | 7dd2a45249a9 |
children | 7d04a6cec75f |
comparison
equal
deleted
inserted
replaced
11664:3da317f52661 | 11665:85ee3d14b906 |
---|---|
26 | 26 |
27 #include "vp56data.h" | 27 #include "vp56data.h" |
28 #include "dsputil.h" | 28 #include "dsputil.h" |
29 #include "get_bits.h" | 29 #include "get_bits.h" |
30 #include "bytestream.h" | 30 #include "bytestream.h" |
31 | 31 #include "vp56dsp.h" |
32 | 32 |
33 typedef struct vp56_context VP56Context; | 33 typedef struct vp56_context VP56Context; |
34 typedef struct vp56_mv VP56mv; | 34 typedef struct vp56_mv VP56mv; |
35 | 35 |
36 typedef void (*VP56ParseVectorAdjustment)(VP56Context *s, | 36 typedef void (*VP56ParseVectorAdjustment)(VP56Context *s, |
37 VP56mv *vect); | 37 VP56mv *vect); |
38 typedef int (*VP56Adjust)(int v, int t); | |
39 typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src, | 38 typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src, |
40 int offset1, int offset2, int stride, | 39 int offset1, int offset2, int stride, |
41 VP56mv mv, int mask, int select, int luma); | 40 VP56mv mv, int mask, int select, int luma); |
42 typedef void (*VP56ParseCoeff)(VP56Context *s); | 41 typedef void (*VP56ParseCoeff)(VP56Context *s); |
43 typedef void (*VP56DefaultModelsInit)(VP56Context *s); | 42 typedef void (*VP56DefaultModelsInit)(VP56Context *s); |
88 } VP56Model; | 87 } VP56Model; |
89 | 88 |
90 struct vp56_context { | 89 struct vp56_context { |
91 AVCodecContext *avctx; | 90 AVCodecContext *avctx; |
92 DSPContext dsp; | 91 DSPContext dsp; |
92 VP56DSPContext vp56dsp; | |
93 ScanTable scantable; | 93 ScanTable scantable; |
94 AVFrame frames[4]; | 94 AVFrame frames[4]; |
95 AVFrame *framep[6]; | 95 AVFrame *framep[6]; |
96 uint8_t *edge_emu_buffer_alloc; | 96 uint8_t *edge_emu_buffer_alloc; |
97 uint8_t *edge_emu_buffer; | 97 uint8_t *edge_emu_buffer; |
147 int srbi; /* second row block index in MB */ | 147 int srbi; /* second row block index in MB */ |
148 int stride[4]; /* stride for each plan */ | 148 int stride[4]; /* stride for each plan */ |
149 | 149 |
150 const uint8_t *vp56_coord_div; | 150 const uint8_t *vp56_coord_div; |
151 VP56ParseVectorAdjustment parse_vector_adjustment; | 151 VP56ParseVectorAdjustment parse_vector_adjustment; |
152 VP56Adjust adjust; | |
153 VP56Filter filter; | 152 VP56Filter filter; |
154 VP56ParseCoeff parse_coeff; | 153 VP56ParseCoeff parse_coeff; |
155 VP56DefaultModelsInit default_models_init; | 154 VP56DefaultModelsInit default_models_init; |
156 VP56ParseVectorModels parse_vector_models; | 155 VP56ParseVectorModels parse_vector_models; |
157 VP56ParseCoeffModels parse_coeff_models; | 156 VP56ParseCoeffModels parse_coeff_models; |