Go to the documentation of this file.
30 #define BITSTREAM_READER_LE
48 #define IVI5_PIC_SIZE_ESC 15
61 int result,
i, p, tile_size, pic_size_indx, mb_size, blk_size, is_scalable;
62 int quant_mat, blk_size_changed = 0;
73 tile_size = (
ctx->gop_flags & 0x40) ? 64 <<
get_bits(&
ctx->gb, 2) : 0;
74 if (tile_size > 256) {
85 av_log(avctx,
AV_LOG_ERROR,
"Scalability: unsupported subdivision! Luma bands: %d, chroma bands: %d\n",
99 if (
ctx->gop_flags & 2) {
121 ctx->pic_conf = pic_conf;
122 ctx->is_scalable = is_scalable;
123 blk_size_changed = 1;
126 for (p = 0; p <= 1; p++) {
128 band = &
ctx->planes[p].bands[
i];
134 mb_size = blk_size << !mb_size;
136 if (p==0 && blk_size==4) {
141 blk_size_changed = mb_size != band->
mb_size || blk_size != band->
blk_size;
142 if (blk_size_changed) {
153 switch ((p << 2) +
i) {
230 band1 = &
ctx->planes[1].bands[
i];
231 band2 = &
ctx->planes[2].bands[
i];
250 if (blk_size_changed) {
255 "Couldn't reallocate internal structures!\n");
260 if (
ctx->gop_flags & 8) {
278 }
while (
i & 0x8000);
323 ctx->prev_frame_type =
ctx->frame_type;
325 if (
ctx->frame_type >= 5) {
336 ctx->gop_invalid = 1;
339 ctx->gop_invalid = 0;
356 if (
ctx->frame_flags & 0x20)
390 if (band_flags & 1) {
404 if (band_flags & 0x10) {
433 if (band_flags & 0x20) {
457 int x, y, mv_x, mv_y, mv_delta, offs, mb_offset,
486 mb->buf_offs = mb_offset;
503 mb->mv_x =
mb->mv_y = 0;
529 if (ref_mb)
mb->q_delta = ref_mb->
q_delta;
531 (
ctx->frame_flags & 8))) {
539 mb->mv_x =
mb->mv_y = 0;
566 if (
x + (
mb->mv_x >>
s) + (y+ (
mb->mv_y >>
s))*band->
pitch < 0 ||
595 switch (
ctx->prev_frame_type) {
598 ctx->buf_switch ^= 1;
599 ctx->dst_buf =
ctx->buf_switch;
600 ctx->ref_buf =
ctx->buf_switch ^ 1;
603 if (!
ctx->inter_scal) {
608 ctx->ref_buf =
ctx->ref2_buf;
614 switch (
ctx->frame_type) {
620 ctx->dst_buf =
ctx->buf_switch;
621 ctx->ref_buf =
ctx->buf_switch ^ 1;
645 ctx->gop_invalid = 1;
655 ctx->pic_conf.pic_width = avctx->
width;
656 ctx->pic_conf.pic_height = avctx->
height;
657 ctx->pic_conf.chroma_width = (avctx->
width + 3) >> 2;
658 ctx->pic_conf.chroma_height = (avctx->
height + 3) >> 2;
659 ctx->pic_conf.tile_width = avctx->
width;
660 ctx->pic_conf.tile_height = avctx->
height;
661 ctx->pic_conf.luma_bands =
ctx->pic_conf.chroma_bands = 1;
static av_cold int init(AVCodecContext *avctx)
static int get_bits_left(GetBitContext *gb)
#define FFSWAP(type, a, b)
const uint8_t * inter_scale
quantization coefficient for inter blocks
av_cold void ff_ivi_init_static_vlc(void)
Initialize static codes used for macroblock and block decoding.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
Copy the pixels into the frame buffer.
InvTransformPtr * inv_transform
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
int rvmap_sel
rvmap table selector
DCTransformPtr * dc_transform
static int ivi_scale_mv(int mv, int mv_scale)
scale motion vector
@ FRAMETYPE_INTER_SCAL
droppable P-frame used in the scalability mode
uint8_t type
macroblock type: 0 - INTRA, 1 - INTER
void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
DC-only inverse row slant transform.
int num_MBs
number of macroblocks in this tile
#define IVI_TOSIGNED(val)
convert unsigned values into signed ones (the sign is in the LSB)
static void skip_bits(GetBitContext *s, int n)
static int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2)
compare some properties of two pictures
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int num_corr
number of correction entries
information for Indeo wavelet band
av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
Close Indeo5 decoder and clean up its context.
static const uint8_t ivi5_scale_quant_4x4_intra[24]
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
#define IVI5_IS_PROTECTED
static av_cold int decode_init(AVCodecContext *avctx)
Initialize Indeo5 decoder.
const uint16_t * intra_base
quantization matrix for intra blocks
#define IVI_MBs_PER_TILE(tile_width, tile_height, mb_size)
calculate number of macroblocks in a tile
void ff_ivi_col_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
inverse 1D column slant transform
information for Indeo macroblock (16x16, 8x8 or 4x4)
static const uint8_t ivi5_scale_quant_4x4_inter[24]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define IVI_VLC_BITS
max number of bits of the ivi's huffman codes
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
AVCodec ff_indeo5_decoder
static void switch_buffers(IVI45DecContext *ctx)
Switch buffers.
int8_t mv_x
motion vector (x component)
void ff_ivi_row_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
inverse 1D row slant transform
static int decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx)
Decode Indeo5 GOP (Group of pictures) header.
const uint8_t * scan
ptr to the scan pattern
const uint16_t * inter_base
quantization matrix for inter blocks
static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
Decode info (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile.
and forward the result(frame or status change) to the corresponding input. If nothing is possible
static int skip_hdr_extension(GetBitContext *gb)
Skip a header extension.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
int data_size
size of the band data
@ IVI_BLK_HUFF
Huffman table is used for coding macroblocks.
av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height)
Initialize tile and macroblock descriptors.
static unsigned int get_bits1(GetBitContext *s)
int inherit_mv
tells if motion vector is inherited from reference macroblock
#define IVI5_PIC_SIZE_ESC
static const uint16_t ivi5_base_quant_4x4_inter[16]
@ FRAMETYPE_INTER
non-droppable P-frame
const uint8_t ff_ivi_vertical_scan_8x8[64]
Scan patterns shared between indeo4 and indeo5.
const uint8_t ff_ivi_horizontal_scan_8x8[64]
const RVMapDesc ff_ivi_rvmap_tabs[9]
Run-value (RLE) tables.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int32_t checksum
for debug purposes
static const uint8_t ivi5_scale_quant_8x8_inter[5][24]
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
av_cold int ff_ivi_init_planes(AVCodecContext *avctx, IVIPlaneDesc *planes, const IVIPicConfig *cfg, int is_indeo4)
Initialize planes (prepares descriptors, allocates buffers etc).
int plane
plane number this band belongs to
static const uint8_t ivi5_common_pic_sizes[30]
standard picture dimensions (width, height divided by 4)
static int is_nonnull_frame(IVI45DecContext *ctx)
void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
two-dimensional inverse slant 8x8 transform
int mb_size
macroblock size
@ FRAMETYPE_INTER_NOREF
droppable P-frame
static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx)
Decode Indeo5 picture header.
information for Indeo tile
const uint8_t * intra_scale
quantization coefficient for intra blocks
IVIMbInfo * mbs
array of macroblock descriptors
#define i(width, name, range_min, range_max)
int bufsize
band buffer size in bytes
IVIMbInfo * ref_mbs
ptr to the macroblock descriptors of the reference tile
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
DC-only two-dimensional inverse slant transform.
static av_always_inline void mv_scale(Mv *dst, Mv *src, int td, int tb)
int8_t q_delta
quant delta
static const uint16_t ivi5_base_quant_8x8_intra[5][64]
void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
Copy the DC coefficient into the first pixel of the block and zero all others.
const uint8_t ff_zigzag_direct[64]
int qdelta_present
tells if Qdelta signal is present in the bitstream (Indeo5 only)
const uint8_t ff_ivi_direct_scan_4x4[16]
static const uint8_t * align_get_bits(GetBitContext *s)
int is_2d_trans
1 indicates that the two-dimensional inverse transform is used
int is_empty
= 1 if this band doesn't contain any data
main external API structure.
static const uint16_t ivi5_base_quant_4x4_intra[16]
static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
Decode Indeo5 band header.
IVIHuffTab blk_vlc
vlc table for decoding block data
int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
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 inherit_qdelta
tells if quantiser delta is inherited from reference macroblock
uint8_t corr[61 *2]
rvmap correction pairs
int width
picture width / height.
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static const uint16_t ivi5_base_quant_8x8_inter[5][64]
Indeo5 dequantization matrixes consist of two tables: base table and scale table.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int is_halfpel
precision of the motion compensation: 0 - fullpel, 1 - halfpel
int glob_quant
quant base for this band
void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
DC-only inverse column slant transform.
static const uint8_t ivi5_scale_quant_8x8_intra[5][24]
ptrdiff_t pitch
pitch associated with the buffers above
void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
two-dimensional inverse slant 4x4 transform
@ FRAMETYPE_NULL
empty frame with no data
int8_t mv_y
motion vector (y component)