1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avoid POSIX reserved _t suffix

Originally committed as revision 16068 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-12-11 22:56:19 +00:00
parent e998ba4fbc
commit 3d52bca6bf
9 changed files with 138 additions and 138 deletions

View File

@ -67,7 +67,7 @@ static int build_huff_tree(VLC *vlc, Node *nodes, int head, int flags)
* first nb_codes nodes.count must be set
*/
int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
Node *nodes, huff_cmp_t cmp, int flags)
Node *nodes, HuffCmp cmp, int flags)
{
int i, j;
int cur_node;

View File

@ -35,8 +35,8 @@ typedef struct {
#define FF_HUFFMAN_FLAG_HNODE_FIRST 0x01
#define FF_HUFFMAN_FLAG_ZERO_COUNT 0x02
typedef int (*huff_cmp_t)(const void *va, const void *vb);
typedef int (*HuffCmp)(const void *va, const void *vb);
int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
Node *nodes, huff_cmp_t cmp, int flags);
Node *nodes, HuffCmp cmp, int flags);
#endif /* AVCODEC_HUFFMAN_H */

View File

@ -33,10 +33,10 @@
#include "vp5data.h"
static int vp5_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
vp56_range_coder_t *c = &s->c;
VP56RangeCoder *c = &s->c;
int rows, cols;
vp56_init_range_decoder(&s->c, buf, buf_size);
@ -84,10 +84,10 @@ static int vp5_adjust(int v, int t)
return v;
}
static void vp5_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int comp, di;
for (comp=0; comp<2; comp++) {
@ -108,10 +108,10 @@ static void vp5_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
}
}
static void vp5_parse_vector_models(vp56_context_t *s)
static void vp5_parse_vector_models(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int comp, node;
for (comp=0; comp<2; comp++) {
@ -131,10 +131,10 @@ static void vp5_parse_vector_models(vp56_context_t *s)
model->vector_pdv[comp][node] = vp56_rac_gets_nn(c, 7);
}
static void vp5_parse_coeff_models(vp56_context_t *s)
static void vp5_parse_coeff_models(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
uint8_t def_prob[11];
int node, cg, ctx;
int ct; /* code type */
@ -177,10 +177,10 @@ static void vp5_parse_coeff_models(vp56_context_t *s)
model->coeff_acct[pt][ct][cg][ctx][node] = av_clip(((model->coeff_ract[pt][ct][cg][node] * vp5_ract_lc[ct][cg][node][ctx][0] + 128) >> 8) + vp5_ract_lc[ct][cg][node][ctx][1], 1, 254);
}
static void vp5_parse_coeff(vp56_context_t *s)
static void vp5_parse_coeff(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
uint8_t *permute = s->scantable.permutated;
uint8_t *model1, *model2;
int coeff, sign, coeff_idx;
@ -250,9 +250,9 @@ static void vp5_parse_coeff(vp56_context_t *s)
}
}
static void vp5_default_models_init(vp56_context_t *s)
static void vp5_default_models_init(VP56Context *s)
{
vp56_model_t *model = s->modelp;
Vp56Model *model = s->modelp;
int i;
for (i=0; i<2; i++) {
@ -267,7 +267,7 @@ static void vp5_default_models_init(vp56_context_t *s)
static av_cold int vp5_decode_init(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
vp56_init(avctx, 1, 0);
s->vp56_coord_div = vp5_coord_div;
@ -286,7 +286,7 @@ AVCodec vp5_decoder = {
"vp5",
CODEC_TYPE_VIDEO,
CODEC_ID_VP5,
sizeof(vp56_context_t),
sizeof(VP56Context),
vp5_decode_init,
NULL,
vp56_free,

View File

@ -28,20 +28,20 @@
#include "vp56data.h"
void vp56_init_dequant(vp56_context_t *s, int quantizer)
void vp56_init_dequant(VP56Context *s, int quantizer)
{
s->quantizer = quantizer;
s->dequant_dc = vp56_dc_dequant[quantizer] << 2;
s->dequant_ac = vp56_ac_dequant[quantizer] << 2;
}
static int vp56_get_vectors_predictors(vp56_context_t *s, int row, int col,
vp56_frame_t ref_frame)
static int vp56_get_vectors_predictors(VP56Context *s, int row, int col,
VP56Frame ref_frame)
{
int nb_pred = 0;
vp56_mv_t vect[2] = {{0,0}, {0,0}};
VP56mv vect[2] = {{0,0}, {0,0}};
int pos, offset;
vp56_mv_t mvp;
VP56mv mvp;
for (pos=0; pos<12; pos++) {
mvp.x = col + vp56_candidate_predictor_pos[pos][0];
@ -73,10 +73,10 @@ static int vp56_get_vectors_predictors(vp56_context_t *s, int row, int col,
return nb_pred+1;
}
static void vp56_parse_mb_type_models(vp56_context_t *s)
static void vp56_parse_mb_type_models(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int i, ctx, type;
for (ctx=0; ctx<3; ctx++) {
@ -144,11 +144,11 @@ static void vp56_parse_mb_type_models(vp56_context_t *s)
}
}
static vp56_mb_t vp56_parse_mb_type(vp56_context_t *s,
vp56_mb_t prev_type, int ctx)
static VP56mb vp56_parse_mb_type(VP56Context *s,
VP56mb prev_type, int ctx)
{
uint8_t *mb_type_model = s->modelp->mb_type[ctx][prev_type];
vp56_range_coder_t *c = &s->c;
VP56RangeCoder *c = &s->c;
if (vp56_rac_get_prob(c, mb_type_model[0]))
return prev_type;
@ -156,9 +156,9 @@ static vp56_mb_t vp56_parse_mb_type(vp56_context_t *s,
return vp56_rac_get_tree(c, vp56_pmbt_tree, mb_type_model);
}
static void vp56_decode_4mv(vp56_context_t *s, int row, int col)
static void vp56_decode_4mv(VP56Context *s, int row, int col)
{
vp56_mv_t mv = {0,0};
VP56mv mv = {0,0};
int type[4];
int b;
@ -173,7 +173,7 @@ static void vp56_decode_4mv(vp56_context_t *s, int row, int col)
for (b=0; b<4; b++) {
switch (type[b]) {
case VP56_MB_INTER_NOVEC_PF:
s->mv[b] = (vp56_mv_t) {0,0};
s->mv[b] = (VP56mv) {0,0};
break;
case VP56_MB_INTER_DELTA_PF:
s->parse_vector_adjustment(s, &s->mv[b]);
@ -197,13 +197,13 @@ static void vp56_decode_4mv(vp56_context_t *s, int row, int col)
s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
} else {
s->mv[4] = s->mv[5] = (vp56_mv_t) {mv.x/4, mv.y/4};
s->mv[4] = s->mv[5] = (VP56mv) {mv.x/4, mv.y/4};
}
}
static vp56_mb_t vp56_decode_mv(vp56_context_t *s, int row, int col)
static VP56mb vp56_decode_mv(VP56Context *s, int row, int col)
{
vp56_mv_t *mv, vect = {0,0};
VP56mv *mv, vect = {0,0};
int ctx, b;
ctx = vp56_get_vectors_predictors(s, row, col, VP56_FRAME_PREVIOUS);
@ -258,14 +258,14 @@ static vp56_mb_t vp56_decode_mv(vp56_context_t *s, int row, int col)
return s->mb_type;
}
static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame)
{
int idx = s->scantable.permutated[0];
int b;
for (b=0; b<6; b++) {
vp56_ref_dc_t *ab = &s->above_blocks[s->above_block_idx[b]];
vp56_ref_dc_t *lb = &s->left_block[vp56_b6to4[b]];
VP56RefDc *ab = &s->above_blocks[s->above_block_idx[b]];
VP56RefDc *lb = &s->left_block[vp56_b6to4[b]];
int count = 0;
int dc = 0;
int i;
@ -299,7 +299,7 @@ static void vp56_add_predictors_dc(vp56_context_t *s, vp56_frame_t ref_frame)
}
}
static void vp56_edge_filter(vp56_context_t *s, uint8_t *yuv,
static void vp56_edge_filter(VP56Context *s, uint8_t *yuv,
int pix_inc, int line_inc, int t)
{
int pix2_inc = 2 * pix_inc;
@ -314,7 +314,7 @@ static void vp56_edge_filter(vp56_context_t *s, uint8_t *yuv,
}
}
static void vp56_deblock_filter(vp56_context_t *s, uint8_t *yuv,
static void vp56_deblock_filter(VP56Context *s, uint8_t *yuv,
int stride, int dx, int dy)
{
int t = vp56_filter_threshold[s->quantizer];
@ -322,7 +322,7 @@ static void vp56_deblock_filter(vp56_context_t *s, uint8_t *yuv,
if (dy) vp56_edge_filter(s, yuv + stride*(10-dy), stride, 1, t);
}
static void vp56_mc(vp56_context_t *s, int b, int plane, uint8_t *src,
static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src,
int stride, int x, int y)
{
uint8_t *dst=s->framep[VP56_FRAME_CURRENT]->data[plane]+s->block_offset[b];
@ -392,11 +392,11 @@ static void vp56_mc(vp56_context_t *s, int b, int plane, uint8_t *src,
}
}
static void vp56_decode_mb(vp56_context_t *s, int row, int col, int is_alpha)
static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha)
{
AVFrame *frame_current, *frame_ref;
vp56_mb_t mb_type;
vp56_frame_t ref_frame;
VP56mb mb_type;
VP56Frame ref_frame;
int b, ab, b_max, plane, off;
if (s->framep[VP56_FRAME_CURRENT]->key_frame)
@ -461,7 +461,7 @@ static void vp56_decode_mb(vp56_context_t *s, int row, int col, int is_alpha)
static int vp56_size_changed(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
int stride = s->framep[VP56_FRAME_CURRENT]->linesize[0];
int i;
@ -497,7 +497,7 @@ static int vp56_size_changed(AVCodecContext *avctx)
int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
int remaining_buf_size = buf_size;
int is_alpha, alpha_offset;
@ -646,7 +646,7 @@ int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
int i;
s->avctx = avctx;
@ -686,7 +686,7 @@ av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
av_cold int vp56_free(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
av_free(s->above_blocks);
av_free(s->macroblocks);

View File

@ -30,20 +30,20 @@
#include "bytestream.h"
typedef struct vp56_context vp56_context_t;
typedef struct vp56_mv vp56_mv_t;
typedef struct vp56_context VP56Context;
typedef struct vp56_mv VP56mv;
typedef void (*vp56_parse_vector_adjustment_t)(vp56_context_t *s,
vp56_mv_t *vect);
typedef int (*vp56_adjust_t)(int v, int t);
typedef void (*vp56_filter_t)(vp56_context_t *s, uint8_t *dst, uint8_t *src,
typedef void (*VP56ParseVectorAdjustment)(VP56Context *s,
VP56mv *vect);
typedef int (*VP56Adjust)(int v, int t);
typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
int offset1, int offset2, int stride,
vp56_mv_t mv, int mask, int select, int luma);
typedef void (*vp56_parse_coeff_t)(vp56_context_t *s);
typedef void (*vp56_default_models_init_t)(vp56_context_t *s);
typedef void (*vp56_parse_vector_models_t)(vp56_context_t *s);
typedef void (*vp56_parse_coeff_models_t)(vp56_context_t *s);
typedef int (*vp56_parse_header_t)(vp56_context_t *s, const uint8_t *buf,
VP56mv mv, int mask, int select, int luma);
typedef void (*VP56ParseCoeff)(VP56Context *s);
typedef void (*VP56DefaultModelsInit)(VP56Context *s);
typedef void (*VP56ParseVectorModels)(VP56Context *s);
typedef void (*VP56ParseCoeffModels)(VP56Context *s);
typedef int (*VP56ParseHeader)(VP56Context *s, const uint8_t *buf,
int buf_size, int *golden_frame);
typedef struct {
@ -51,13 +51,13 @@ typedef struct {
int bits;
const uint8_t *buffer;
unsigned long code_word;
} vp56_range_coder_t;
} VP56RangeCoder;
typedef struct {
uint8_t not_null_dc;
vp56_frame_t ref_frame;
VP56Frame ref_frame;
DCTELEM dc_coeff;
} vp56_ref_dc_t;
} VP56RefDc;
struct vp56_mv {
int x;
@ -66,8 +66,8 @@ struct vp56_mv {
typedef struct {
uint8_t type;
vp56_mv_t mv;
} vp56_macroblock_t;
VP56mv mv;
} VP56Macroblock;
typedef struct {
uint8_t coeff_reorder[64]; /* used in vp6 only */
@ -84,7 +84,7 @@ typedef struct {
uint8_t coeff_runv[2][14]; /* run value (vp6 only) */
uint8_t mb_type[3][10][10]; /* model for decoding MB type */
uint8_t mb_types_stats[3][10][2];/* contextual, next MB type stats */
} vp56_model_t;
} Vp56Model;
struct vp56_context {
AVCodecContext *avctx;
@ -94,9 +94,9 @@ struct vp56_context {
AVFrame *framep[6];
uint8_t *edge_emu_buffer_alloc;
uint8_t *edge_emu_buffer;
vp56_range_coder_t c;
vp56_range_coder_t cc;
vp56_range_coder_t *ccp;
VP56RangeCoder c;
VP56RangeCoder cc;
VP56RangeCoder *ccp;
int sub_version;
/* frame info */
@ -111,19 +111,19 @@ struct vp56_context {
uint16_t dequant_ac;
/* DC predictors management */
vp56_ref_dc_t *above_blocks;
vp56_ref_dc_t left_block[4];
VP56RefDc *above_blocks;
VP56RefDc left_block[4];
int above_block_idx[6];
DCTELEM prev_dc[3][3]; /* [plan][ref_frame] */
/* blocks / macroblock */
vp56_mb_t mb_type;
vp56_macroblock_t *macroblocks;
VP56mb mb_type;
VP56Macroblock *macroblocks;
DECLARE_ALIGNED_16(DCTELEM, block_coeff[6][64]);
/* motion vectors */
vp56_mv_t mv[6]; /* vectors for each block in MB */
vp56_mv_t vector_candidate[2];
VP56mv mv[6]; /* vectors for each block in MB */
VP56mv vector_candidate[2];
int vector_candidate_pos;
/* filtering hints */
@ -146,17 +146,17 @@ struct vp56_context {
int stride[4]; /* stride for each plan */
const uint8_t *vp56_coord_div;
vp56_parse_vector_adjustment_t parse_vector_adjustment;
vp56_adjust_t adjust;
vp56_filter_t filter;
vp56_parse_coeff_t parse_coeff;
vp56_default_models_init_t default_models_init;
vp56_parse_vector_models_t parse_vector_models;
vp56_parse_coeff_models_t parse_coeff_models;
vp56_parse_header_t parse_header;
VP56ParseVectorAdjustment parse_vector_adjustment;
VP56Adjust adjust;
VP56Filter filter;
VP56ParseCoeff parse_coeff;
VP56DefaultModelsInit default_models_init;
VP56ParseVectorModels parse_vector_models;
VP56ParseCoeffModels parse_coeff_models;
VP56ParseHeader parse_header;
vp56_model_t *modelp;
vp56_model_t models[2];
Vp56Model *modelp;
Vp56Model models[2];
/* huffman decoding */
int use_huffman;
@ -170,7 +170,7 @@ struct vp56_context {
void vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
int vp56_free(AVCodecContext *avctx);
void vp56_init_dequant(vp56_context_t *s, int quantizer);
void vp56_init_dequant(VP56Context *s, int quantizer);
int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf, int buf_size);
@ -179,7 +179,7 @@ int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
* vp56 specific range coder implementation
*/
static inline void vp56_init_range_decoder(vp56_range_coder_t *c,
static inline void vp56_init_range_decoder(VP56RangeCoder *c,
const uint8_t *buf, int buf_size)
{
c->high = 255;
@ -188,7 +188,7 @@ static inline void vp56_init_range_decoder(vp56_range_coder_t *c,
c->code_word = bytestream_get_be16(&c->buffer);
}
static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob)
static inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
{
unsigned int low = 1 + (((c->high - 1) * prob) / 256);
unsigned int low_shift = low << 8;
@ -213,7 +213,7 @@ static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob)
return bit;
}
static inline int vp56_rac_get(vp56_range_coder_t *c)
static inline int vp56_rac_get(VP56RangeCoder *c)
{
/* equiprobable */
int low = (c->high + 1) >> 1;
@ -235,7 +235,7 @@ static inline int vp56_rac_get(vp56_range_coder_t *c)
return bit;
}
static inline int vp56_rac_gets(vp56_range_coder_t *c, int bits)
static inline int vp56_rac_gets(VP56RangeCoder *c, int bits)
{
int value = 0;
@ -246,14 +246,14 @@ static inline int vp56_rac_gets(vp56_range_coder_t *c, int bits)
return value;
}
static inline int vp56_rac_gets_nn(vp56_range_coder_t *c, int bits)
static inline int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
{
int v = vp56_rac_gets(c, 7) << 1;
return v + !v;
}
static inline int vp56_rac_get_tree(vp56_range_coder_t *c,
const vp56_tree_t *tree,
static inline int vp56_rac_get_tree(VP56RangeCoder *c,
const VP56Tree *tree,
const uint8_t *probs)
{
while (tree->val > 0) {

View File

@ -44,7 +44,7 @@ const uint8_t vp56_def_mb_types_stats[3][10][2] = {
{ 1, 2 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, },
};
const vp56_tree_t vp56_pva_tree[] = {
const VP56Tree vp56_pva_tree[] = {
{ 8, 0},
{ 4, 1},
{ 2, 2}, {-0}, {-1},
@ -54,7 +54,7 @@ const vp56_tree_t vp56_pva_tree[] = {
{ 2, 6}, {-6}, {-7},
};
const vp56_tree_t vp56_pc_tree[] = {
const VP56Tree vp56_pc_tree[] = {
{ 4, 6},
{ 2, 7}, {-0}, {-1},
{ 4, 8},

View File

@ -34,7 +34,7 @@ typedef enum {
VP56_FRAME_GOLDEN2 = 3,
VP56_FRAME_UNUSED = 4,
VP56_FRAME_UNUSED2 = 5,
} vp56_frame_t;
} VP56Frame;
typedef enum {
VP56_MB_INTER_NOVEC_PF = 0, /**< Inter MB, no vector, from previous frame */
@ -47,23 +47,23 @@ typedef enum {
VP56_MB_INTER_4V = 7, /**< Inter MB, 4 vectors, from previous frame */
VP56_MB_INTER_V1_GF = 8, /**< Inter MB, first vector, from golden frame */
VP56_MB_INTER_V2_GF = 9, /**< Inter MB, second vector, from golden frame */
} vp56_mb_t;
} VP56mb;
typedef struct {
int8_t val;
int8_t prob_idx;
} vp56_tree_t;
} VP56Tree;
extern const uint8_t vp56_b2p[];
extern const uint8_t vp56_b6to4[];
extern const uint8_t vp56_coeff_parse_table[6][11];
extern const uint8_t vp56_def_mb_types_stats[3][10][2];
extern const vp56_tree_t vp56_pva_tree[];
extern const vp56_tree_t vp56_pc_tree[];
extern const VP56Tree vp56_pva_tree[];
extern const VP56Tree vp56_pc_tree[];
extern const uint8_t vp56_coeff_bias[];
extern const uint8_t vp56_coeff_bit_length[];
static const vp56_frame_t vp56_reference_frame[] = {
static const VP56Frame vp56_reference_frame[] = {
VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_NOVEC_PF */
VP56_FRAME_CURRENT, /* VP56_MB_INTRA */
VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_DELTA_PF */
@ -212,7 +212,7 @@ static const uint8_t vp56_mb_type_model_model[] = {
171, 83, 199, 140, 125, 104,
};
static const vp56_tree_t vp56_pmbtm_tree[] = {
static const VP56Tree vp56_pmbtm_tree[] = {
{ 4, 0},
{ 2, 1}, {-8}, {-4},
{ 8, 2},
@ -221,7 +221,7 @@ static const vp56_tree_t vp56_pmbtm_tree[] = {
{ 2, 5}, {-24}, {-20}, {-16}, {-12}, {-0},
};
static const vp56_tree_t vp56_pmbt_tree[] = {
static const VP56Tree vp56_pmbt_tree[] = {
{ 8, 1},
{ 4, 2},
{ 2, 4}, {-VP56_MB_INTER_NOVEC_PF}, {-VP56_MB_INTER_DELTA_PF},

View File

@ -37,13 +37,13 @@
#include "vp6data.h"
static void vp6_parse_coeff(vp56_context_t *s);
static void vp6_parse_coeff_huffman(vp56_context_t *s);
static void vp6_parse_coeff(VP56Context *s);
static void vp6_parse_coeff_huffman(VP56Context *s);
static int vp6_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
vp56_range_coder_t *c = &s->c;
VP56RangeCoder *c = &s->c;
int parse_filter_info = 0;
int coeff_offset = 0;
int vrt_shift = 0;
@ -151,7 +151,7 @@ static int vp6_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
return res;
}
static void vp6_coeff_order_table_init(vp56_context_t *s)
static void vp6_coeff_order_table_init(VP56Context *s)
{
int i, pos, idx = 1;
@ -162,9 +162,9 @@ static void vp6_coeff_order_table_init(vp56_context_t *s)
s->modelp->coeff_index_to_pos[idx++] = pos;
}
static void vp6_default_models_init(vp56_context_t *s)
static void vp6_default_models_init(VP56Context *s)
{
vp56_model_t *model = s->modelp;
Vp56Model *model = s->modelp;
model->vector_dct[0] = 0xA2;
model->vector_dct[1] = 0xA4;
@ -180,10 +180,10 @@ static void vp6_default_models_init(vp56_context_t *s)
vp6_coeff_order_table_init(s);
}
static void vp6_parse_vector_models(vp56_context_t *s)
static void vp6_parse_vector_models(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int comp, node;
for (comp=0; comp<2; comp++) {
@ -211,7 +211,7 @@ static int vp6_huff_cmp(const void *va, const void *vb)
return (a->count - b->count)*16 + (b->sym - a->sym);
}
static void vp6_build_huff_tree(vp56_context_t *s, uint8_t coeff_model[],
static void vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
const uint8_t *map, unsigned size, VLC *vlc)
{
Node nodes[2*size], *tmp = &nodes[size];
@ -231,10 +231,10 @@ static void vp6_build_huff_tree(vp56_context_t *s, uint8_t coeff_model[],
FF_HUFFMAN_FLAG_HNODE_FIRST);
}
static void vp6_parse_coeff_models(vp56_context_t *s)
static void vp6_parse_coeff_models(VP56Context *s)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int def_prob[11];
int node, cg, ctx, pos;
int ct; /* code type */
@ -296,13 +296,13 @@ static void vp6_parse_coeff_models(vp56_context_t *s)
}
}
static void vp6_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
static void vp6_parse_vector_adjustment(VP56Context *s, VP56mv *vect)
{
vp56_range_coder_t *c = &s->c;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = &s->c;
Vp56Model *model = s->modelp;
int comp;
*vect = (vp56_mv_t) {0,0};
*vect = (VP56mv) {0,0};
if (s->vector_candidate_pos < 2)
*vect = s->vector_candidate[0];
@ -338,7 +338,7 @@ static void vp6_parse_vector_adjustment(vp56_context_t *s, vp56_mv_t *vect)
* Read number of consecutive blocks with null DC or AC.
* This value is < 74.
*/
static unsigned vp6_get_nb_null(vp56_context_t *s)
static unsigned vp6_get_nb_null(VP56Context *s)
{
unsigned val = get_bits(&s->gb, 2);
if (val == 2)
@ -350,9 +350,9 @@ static unsigned vp6_get_nb_null(vp56_context_t *s)
return val;
}
static void vp6_parse_coeff_huffman(vp56_context_t *s)
static void vp6_parse_coeff_huffman(VP56Context *s)
{
vp56_model_t *model = s->modelp;
Vp56Model *model = s->modelp;
uint8_t *permute = s->scantable.permutated;
VLC *vlc_coeff;
int coeff, sign, coeff_idx;
@ -405,10 +405,10 @@ static void vp6_parse_coeff_huffman(vp56_context_t *s)
}
}
static void vp6_parse_coeff(vp56_context_t *s)
static void vp6_parse_coeff(VP56Context *s)
{
vp56_range_coder_t *c = s->ccp;
vp56_model_t *model = s->modelp;
VP56RangeCoder *c = s->ccp;
Vp56Model *model = s->modelp;
uint8_t *permute = s->scantable.permutated;
uint8_t *model1, *model2, *model3;
int coeff, sign, coeff_idx;
@ -522,7 +522,7 @@ static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride,
}
}
static void vp6_filter_diag2(vp56_context_t *s, uint8_t *dst, uint8_t *src,
static void vp6_filter_diag2(VP56Context *s, uint8_t *dst, uint8_t *src,
int stride, int h_weight, int v_weight)
{
uint8_t *tmp = s->edge_emu_buffer+16;
@ -563,9 +563,9 @@ static void vp6_filter_diag4(uint8_t *dst, uint8_t *src, int stride,
}
}
static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src,
static void vp6_filter(VP56Context *s, uint8_t *dst, uint8_t *src,
int offset1, int offset2, int stride,
vp56_mv_t mv, int mask, int select, int luma)
VP56mv mv, int mask, int select, int luma)
{
int filter4 = 0;
int x8 = mv.x & mask;
@ -615,7 +615,7 @@ static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src,
static av_cold int vp6_decode_init(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
VP56Context *s = avctx->priv_data;
vp56_init(avctx, avctx->codec->id == CODEC_ID_VP6,
avctx->codec->id == CODEC_ID_VP6A);
@ -635,7 +635,7 @@ AVCodec vp6_decoder = {
"vp6",
CODEC_TYPE_VIDEO,
CODEC_ID_VP6,
sizeof(vp56_context_t),
sizeof(VP56Context),
vp6_decode_init,
NULL,
vp56_free,
@ -649,7 +649,7 @@ AVCodec vp6f_decoder = {
"vp6f",
CODEC_TYPE_VIDEO,
CODEC_ID_VP6F,
sizeof(vp56_context_t),
sizeof(VP56Context),
vp6_decode_init,
NULL,
vp56_free,
@ -663,7 +663,7 @@ AVCodec vp6a_decoder = {
"vp6a",
CODEC_TYPE_VIDEO,
CODEC_ID_VP6A,
sizeof(vp56_context_t),
sizeof(VP56Context),
vp6_decode_init,
NULL,
vp56_free,

View File

@ -283,7 +283,7 @@ static const int16_t vp6_block_copy_filter[17][8][4] = {
{ -2, 16, 118, -4 } },
};
static const vp56_tree_t vp6_pcr_tree[] = {
static const VP56Tree vp6_pcr_tree[] = {
{ 8, 0},
{ 4, 1},
{ 2, 2}, {-1}, {-2},