132
135
int band_num; ///< band number
138
int aheight; ///< aligned band height
135
139
const uint8_t *data_ptr; ///< ptr to the first byte of the band data
136
140
int data_size; ///< size of the band data
137
141
int16_t *buf; ///< pointer to the output buffer for this band
192
196
uint8_t chroma_bands;
199
typedef struct IVI45DecContext {
202
RVMapDesc rvmap_tabs[9]; ///< local corrected copy of the static rvmap tables
206
int prev_frame_type; ///< frame type of the previous frame
207
uint32_t data_size; ///< size of the frame data in bytes from picture header
209
int transp_status; ///< transparency mode status: 1 - enabled
210
const uint8_t *frame_data; ///< input frame data pointer
211
int inter_scal; ///< signals a sequence of scalable inter frames
212
uint32_t frame_size; ///< frame size in bytes
213
uint32_t pic_hdr_size; ///< picture header size in bytes
215
uint16_t checksum; ///< frame checksum
217
IVIPicConfig pic_conf;
218
IVIPlaneDesc planes[3]; ///< color planes
220
int buf_switch; ///< used to switch between three buffers
221
int dst_buf; ///< buffer index for the currently decoded frame
222
int ref_buf; ///< inter frame reference buffer index
223
int ref2_buf; ///< temporal storage for switching buffers
225
IVIHuffTab mb_vlc; ///< current macroblock table descriptor
226
IVIHuffTab blk_vlc; ///< current block table descriptor
230
uint8_t in_q; ///< flag for explicitly stored quantiser delta
231
uint8_t pic_glob_quant;
234
uint16_t gop_hdr_size;
238
#if IVI4_STREAM_ANALYSER
239
uint8_t has_b_frames;
243
uint8_t uses_fullpel;
246
int (*decode_pic_hdr) (struct IVI45DecContext *ctx, AVCodecContext *avctx);
247
int (*decode_band_hdr) (struct IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx);
248
int (*decode_mb_info) (struct IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx);
249
void (*switch_buffers) (struct IVI45DecContext *ctx);
250
int (*is_nonnull_frame)(struct IVI45DecContext *ctx);
195
255
/** compare some properties of two pictures */
196
256
static inline int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2)
316
376
int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile);
319
* Handle empty tiles by performing data copying and motion
320
* compensation respectively.
322
* @param[in] avctx ptr to the AVCodecContext
323
* @param[in] band pointer to the band descriptor
324
* @param[in] tile pointer to the tile descriptor
325
* @param[in] mv_scale scaling factor for motion vectors
327
void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
328
IVITile *tile, int32_t mv_scale);
331
379
* Convert and output the current plane.
332
380
* This conversion is done by adding back the bias value of 128
333
381
* (subtracted in the encoder) and clipping the result.
349
397
int ivi_check_band (IVIBandDesc *band, const uint8_t *ref, int pitch);
399
int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
401
av_cold int ff_ivi_decode_close(AVCodecContext *avctx);
351
403
#endif /* AVCODEC_IVI_COMMON_H */