Go to the documentation of this file.
49 #define IVI_VLC_BITS 13
50 #define IVI5_IS_PROTECTED 0x20
283 #define IVI_NUM_TILES(stride, tile_size) (((stride) + (tile_size) - 1) / (tile_size))
286 #define IVI_MBs_PER_TILE(tile_width, tile_height, mb_size) \
287 ((((tile_width) + (mb_size) - 1) / (mb_size)) * (((tile_height) + (mb_size) - 1) / (mb_size)))
290 #define IVI_TOSIGNED(val) (-(((val) >> 1) ^ -((val) & 1)))
RVMapDesc rvmap_tabs[9]
local corrected copy of the static rvmap tables
@ IVI4_FRAMETYPE_NULL_FIRST
empty frame with no data
uint16_t checksum
frame checksum
uint32_t pic_hdr_size
picture header size in bytes
const uint8_t * inter_scale
quantization coefficient for inter blocks
int ff_ivi_init_planes(AVCodecContext *avctx, IVIPlaneDesc *planes, const IVIPicConfig *cfg, int is_indeo4)
Initialize planes (prepares descriptors, allocates buffers etc).
static const int8_t mv[256][2]
huffman codebook descriptor
This structure describes decoded (raw) audio or video data.
InvTransformPtr * inv_transform
const uint8_t ff_ivi_vertical_scan_8x8[64]
Common scan patterns (defined in ivi_common.c)
uint8_t cbp
coded block pattern
uint8_t eob_sym
end of block symbol
int rvmap_sel
rvmap table selector
uint8_t num_bands
number of bands this plane subdivided into
DCTransformPtr * dc_transform
VLC * tab
index of one of the predefined tables or "7" for custom one
static int ivi_scale_mv(int mv, int mv_scale)
scale motion vector
int(* decode_pic_hdr)(struct IVI45DecContext *ctx, AVCodecContext *avctx)
uint8_t type
macroblock type: 0 - INTRA, 1 - INTER
int num_MBs
number of macroblocks in this tile
void() DCTransformPtr(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
const uint8_t * data_ptr
ptr to the first byte of the band data
int inter_scal
signals a sequence of scalable inter frames
IVIPlaneDesc planes[3]
color planes
int is_empty
= 1 if this tile doesn't contain any data
static int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2)
compare some properties of two pictures
uint8_t has_transp
transparency mode status: 1 - enabled
int num_corr
number of correction entries
information for Indeo wavelet band
macroblock/block huffman table descriptor
IVITile * tiles
array of tile descriptors
const uint16_t * intra_base
quantization matrix for intra blocks
information for Indeo macroblock (16x16, 8x8 or 4x4)
@ IVI4_FRAMETYPE_INTER_NOREF
droppable P-frame
const RVMapDesc ff_ivi_rvmap_tabs[9]
Run-value (RLE) tables.
int num_tiles
number of tiles in this band
int8_t mv_x
motion vector (x component)
int16_t * ref_buf
pointer to the reference frame buffer (for motion compensation)
const uint8_t * frame_data
input frame data pointer
const uint8_t * scan
ptr to the scan pattern
int data_size
size of the data in bytes
const uint16_t * inter_base
quantization matrix for inter blocks
IVIHuffDesc cust_desc
pointer to the table associated with tab_sel
@ IVI_BLK_HUFF
Huffman table is used for coding macroblocks.
int buf_switch
used to switch between three buffers
color plane (luma or chroma) information
int(* decode_band_hdr)(struct IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
int dst_buf
buffer index for the currently decoded frame
int data_size
size of the band data
int ref2_buf
temporal storage for switching buffers
int inherit_mv
tells if motion vector is inherited from reference macroblock
int aheight
aligned band height
int ref_buf
inter frame reference buffer index
int8_t b_mv_x
second motion vector (x component)
int32_t checksum
for debug purposes
@ IVI4_FRAMETYPE_NULL_LAST
empty frame with no data
run-value (RLE) table descriptor
const uint8_t ff_ivi_horizontal_scan_8x8[64]
int plane
plane number this band belongs to
@ IVI4_FRAMETYPE_INTER
non-droppable P-frame
int mb_size
macroblock size
int16_t * bufs[4]
array of pointers to the band buffers
void ff_ivi_init_static_vlc(void)
Initialize static codes used for macroblock and block decoding.
information for Indeo tile
int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint32_t data_size
size of the frame data in bytes from picture header
uint8_t in_q
flag for explicitly stored quantiser delta
int scan_size
size of the scantable
const uint8_t * intra_scale
quantization coefficient for intra blocks
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
IVIMbInfo * mbs
array of macroblock descriptors
int bufsize
band buffer size in bytes
IVIMbInfo * ref_mbs
ptr to the macroblock descriptors of the reference tile
int16_t * buf
pointer to the output buffer for this band
uint8_t esc_sym
escape symbol
static av_always_inline void mv_scale(Mv *dst, Mv *src, int td, int tb)
int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height)
Initialize tile and macroblock descriptors.
@ IVI4_FRAMETYPE_INTRA1
intra frame with slightly different bitstream coding
int16_t * b_ref_buf
pointer to the second reference frame buffer (for motion compensation)
int8_t q_delta
quant delta
int8_t b_mv_y
second motion vector (y component)
@ IVI4_FRAMETYPE_BIDIR
bidirectional frame
int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, IVIHuffTab *huff_tab, AVCodecContext *avctx)
Decode a huffman codebook descriptor from the bitstream and select specified huffman table.
int qdelta_present
tells if Qdelta signal is present in the bitstream (Indeo5 only)
RVMapDesc * rv_map
ptr to the RLE table for this band
int is_2d_trans
1 indicates that the two-dimensional inverse transform is used
uint32_t buf_offs
address in the output buffer for this mb
int is_empty
= 1 if this band doesn't contain any data
main external API structure.
IVIHuffTab blk_vlc
current block table descriptor
const uint8_t ff_ivi_direct_scan_4x4[16]
void(* switch_buffers)(struct IVI45DecContext *ctx)
IVIBandDesc * bands
array of band descriptors
static const struct @322 planes[]
uint32_t frame_size
frame size in bytes
IVIHuffTab blk_vlc
vlc table for decoding block data
int prev_frame_type
frame type of the previous frame
int(* decode_mb_info)(struct IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
This structure stores compressed data.
int inherit_qdelta
tells if quantiser delta is inherited from reference macroblock
uint8_t corr[61 *2]
rvmap correction pairs
#define flags(name, subs,...)
int is_halfpel
precision of the motion compensation: 0 - fullpel, 1 - halfpel
int(* is_nonnull_frame)(struct IVI45DecContext *ctx)
int glob_quant
quant base for this band
int ff_ivi_decode_close(AVCodecContext *avctx)
Close Indeo5 decoder and clean up its context.
int quant_mat
dequant matrix index
ptrdiff_t pitch
pitch associated with the buffers above
IVIHuffTab mb_vlc
current macroblock table descriptor
int b_ref_buf
second reference frame buffer index
void() InvTransformPtr(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
Declare inverse transform function types.
VLC cust_tab
custom Huffman codebook descriptor
int8_t mv_y
motion vector (y component)