Libav
rv34.h
Go to the documentation of this file.
1 /*
2  * RV30/40 decoder common data declarations
3  * Copyright (c) 2007 Mike Melanson, Konstantin Shishkov
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
27 #ifndef AVCODEC_RV34_H
28 #define AVCODEC_RV34_H
29 
30 #include "avcodec.h"
31 #include "mpegvideo.h"
32 
33 #include "h264pred.h"
34 #include "rv34dsp.h"
35 
36 #define MB_TYPE_SEPARATE_DC 0x01000000
37 #define IS_SEPARATE_DC(a) ((a) & MB_TYPE_SEPARATE_DC)
38 
56 };
57 
63 typedef struct RV34VLC{
65  VLC cbp[2][4];
70 }RV34VLC;
71 
73 typedef struct SliceInfo{
74  int type;
75  int quant;
76  int vlc_set;
77  int start, end;
78  int width;
79  int height;
80  int pts;
81 }SliceInfo;
82 
84 typedef struct RV34DecContext{
88  int8_t *intra_types;
92 
96 
97  int *mb_type;
98  int block_type;
99  int luma_vlc;
101  int is16;
102  int dmv[4][2];
103 
104  int rv30;
105  int rpr;
106 
111 
112  uint16_t *cbp_luma;
114  uint16_t *deblock_coefs;
115 
117  DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4];
118 
123 
125  int (*decode_mb_info)(struct RV34DecContext *r);
126  int (*decode_intra_types)(struct RV34DecContext *r, GetBitContext *gb, int8_t *dst);
127  void (*loop_filter)(struct RV34DecContext *r, int row);
129 
133 int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
135 int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt);
139 
140 #endif /* AVCODEC_RV34_H */