|
FFmpeg
|
This is a decoder for Intel Indeo Video v3. More...
#include "libavutil/attributes.h"#include "libavutil/imgutils.h"#include "libavutil/intreadwrite.h"#include "libavutil/mem.h"#include "libavutil/thread.h"#include "avcodec.h"#include "codec_internal.h"#include "decode.h"#include "copy_block.h"#include "bytestream.h"#include "get_bits.h"#include "hpeldsp.h"#include "indeo3data.h"Go to the source code of this file.
Data Structures | |
| struct | Plane |
| struct | Cell |
| struct | Indeo3DecodeContext |
Macros | |
| #define | BS_8BIT_PEL (1 << 1) |
| 8-bit pixel bitdepth indicator | |
| #define | BS_KEYFRAME (1 << 2) |
| intra frame indicator | |
| #define | BS_MV_Y_HALF (1 << 4) |
| vertical mv halfpel resolution indicator | |
| #define | BS_MV_X_HALF (1 << 5) |
| horizontal mv halfpel resolution indicator | |
| #define | BS_NONREF (1 << 8) |
| nonref (discardable) frame indicator | |
| #define | BS_BUFFER 9 |
| indicates which of two frame buffers should be used | |
| #define | CELL_STACK_MAX 20 |
| #define | AVG_32(dst, src, ref) |
| #define | AVG_64(dst, src, ref) |
| #define | BUFFER_PRECHECK |
| #define | RLE_BLOCK_COPY |
| #define | RLE_BLOCK_COPY_8 |
| #define | RLE_LINES_COPY copy_block4(dst, ref, row_offset, row_offset, num_lines << v_zoom) |
| #define | RLE_LINES_COPY_M10 |
| #define | APPLY_DELTA_4 |
| #define | APPLY_DELTA_8 |
| #define | APPLY_DELTA_1011_INTER |
| #define | SPLIT_CELL(size, new_size) |
| #define | UPDATE_BITPOS(n) |
| #define | RESYNC_BITSTREAM |
| #define | CHECK_CELL |
| #define | OS_HDR_ID MKBETAG('F', 'R', 'M', 'H') |
Enumerations | |
| enum | { RLE_ESC_F9 = 249 , RLE_ESC_FA = 250 , RLE_ESC_FB = 251 , RLE_ESC_FC = 252 , RLE_ESC_FD = 253 , RLE_ESC_FE = 254 , RLE_ESC_FF = 255 } |
| enum | { IV3_NOERR = 0 , IV3_BAD_RLE = 1 , IV3_BAD_DATA = 2 , IV3_BAD_COUNTER = 3 , IV3_UNSUPPORTED = 4 , IV3_OUT_OF_DATA = 5 } |
| enum | { H_SPLIT = 0 , V_SPLIT = 1 , INTRA_NULL = 2 , INTER_DATA = 3 } |
Functions | |
| static av_cold void | build_requant_tab (void) |
| static av_cold void | free_frame_buffers (Indeo3DecodeContext *ctx) |
| static av_cold int | allocate_frame_buffers (Indeo3DecodeContext *ctx, AVCodecContext *avctx, int luma_width, int luma_height) |
| static int | copy_cell (Indeo3DecodeContext *ctx, Plane *plane, Cell *cell) |
| Copy pixels of the cell(x + mv_x, y + mv_y) from the previous frame into the cell(x, y) in the current frame. | |
| static uint64_t | replicate64 (uint64_t a) |
| static uint32_t | replicate32 (uint32_t a) |
| static void | fill_64 (uint8_t *dst, const uint64_t pix, int32_t n, ptrdiff_t row_offset) |
| static int | decode_cell_data (Indeo3DecodeContext *ctx, Cell *cell, uint8_t *block, const uint8_t *ref_block, ptrdiff_t row_offset, int h_zoom, int v_zoom, int mode, const vqEntry *delta[2], int swap_quads[2], const uint8_t **data_ptr, const uint8_t *last_ptr) |
| static int | decode_cell (Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, Cell *cell, const uint8_t *data_ptr, const uint8_t *last_ptr) |
| Decode a vector-quantized cell. | |
| static int | parse_bintree (Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, int code, Cell *ref_cell, const int depth, const int strip_width) |
| static int | decode_plane (Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, const uint8_t *data, int32_t data_size, int32_t strip_width) |
| static int | decode_frame_headers (Indeo3DecodeContext *ctx, AVCodecContext *avctx, const uint8_t *buf, int buf_size) |
| static void | output_plane (const Plane *plane, int buf_sel, uint8_t *dst, ptrdiff_t dst_pitch, int dst_height) |
| Convert and output the current plane. | |
| static av_cold int | decode_init (AVCodecContext *avctx) |
| static int | decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) |
| static av_cold int | decode_close (AVCodecContext *avctx) |
Variables | |
| static uint8_t | requant_tab [8][128] |
| const FFCodec | ff_indeo3_decoder |
This is a decoder for Intel Indeo Video v3.
It is based on vector quantization, run-length coding and motion compensation. Known container formats: .avi and .mov Known FOURCCs: 'IV31', 'IV32'
Definition in file indeo3.c.
| #define BS_8BIT_PEL (1 << 1) |
8-bit pixel bitdepth indicator
Definition at line 60 of file indeo3.c.
Referenced by decode_frame_headers().
| #define BS_KEYFRAME (1 << 2) |
| #define BS_MV_Y_HALF (1 << 4) |
vertical mv halfpel resolution indicator
Definition at line 62 of file indeo3.c.
Referenced by decode_frame_headers().
| #define BS_MV_X_HALF (1 << 5) |
horizontal mv halfpel resolution indicator
Definition at line 63 of file indeo3.c.
Referenced by decode_frame_headers().
| #define BS_NONREF (1 << 8) |
nonref (discardable) frame indicator
Definition at line 64 of file indeo3.c.
Referenced by decode_frame().
| #define BS_BUFFER 9 |
indicates which of two frame buffers should be used
Definition at line 65 of file indeo3.c.
Referenced by decode_frame().
| #define CELL_STACK_MAX 20 |
Definition at line 76 of file indeo3.c.
Referenced by decode_plane().
| #define BUFFER_PRECHECK |
Definition at line 346 of file indeo3.c.
Referenced by decode_cell_data().
| #define RLE_BLOCK_COPY |
| #define RLE_BLOCK_COPY_8 |
Definition at line 354 of file indeo3.c.
Referenced by decode_cell_data().
| #define RLE_LINES_COPY copy_block4(dst, ref, row_offset, row_offset, num_lines << v_zoom) |
Definition at line 363 of file indeo3.c.
Referenced by decode_cell_data().
| #define RLE_LINES_COPY_M10 |
Definition at line 366 of file indeo3.c.
Referenced by decode_cell_data().
| #define APPLY_DELTA_4 |
Definition at line 375 of file indeo3.c.
Referenced by decode_cell_data().
| #define APPLY_DELTA_8 |
Definition at line 388 of file indeo3.c.
Referenced by decode_cell_data().
| #define APPLY_DELTA_1011_INTER |
Definition at line 410 of file indeo3.c.
Referenced by decode_cell_data().
| #define SPLIT_CELL | ( | size, | |
| new_size ) |
| #define UPDATE_BITPOS | ( | n | ) |
Definition at line 739 of file indeo3.c.
Referenced by parse_bintree().
| #define RESYNC_BITSTREAM |
Definition at line 743 of file indeo3.c.
Referenced by parse_bintree().
| #define CHECK_CELL |
Definition at line 750 of file indeo3.c.
Referenced by parse_bintree().
Definition at line 899 of file indeo3.c.
Referenced by decode_frame_headers().
| anonymous enum |
| anonymous enum |
| anonymous enum |
|
static |
Definition at line 123 of file indeo3.c.
Referenced by decode_init().
|
static |
Definition at line 155 of file indeo3.c.
Referenced by decode_close(), and decode_frame_headers().
|
static |
Definition at line 169 of file indeo3.c.
Referenced by decode_frame_headers(), and decode_init().
|
static |
Copy pixels of the cell(x + mv_x, y + mv_y) from the previous frame into the cell(x, y) in the current frame.
| ctx | pointer to the decoder context |
| plane | pointer to the plane descriptor |
| cell | pointer to the cell descriptor |
Definition at line 238 of file indeo3.c.
Referenced by decode_cell(), and parse_bintree().
|
inlinestatic |
|
static |
Definition at line 432 of file indeo3.c.
Referenced by decode_cell().
|
static |
Decode a vector-quantized cell.
It consists of several routines, each of which handles one or more "modes" with which a cell can be encoded.
| ctx | pointer to the decoder context |
| avctx | ptr to the AVCodecContext |
| plane | pointer to the plane descriptor |
| cell | pointer to the cell descriptor |
| data_ptr | pointer to the compressed data |
| last_ptr | pointer to the last byte to catch reads past end of buffer |
Definition at line 586 of file indeo3.c.
Referenced by parse_bintree().
|
static |
Definition at line 759 of file indeo3.c.
Referenced by decode_plane(), and parse_bintree().
|
static |
Definition at line 860 of file indeo3.c.
Referenced by decode_frame().
|
static |
Definition at line 901 of file indeo3.c.
Referenced by decode_frame().
|
static |
Convert and output the current plane.
All pixel values will be upsampled by shifting right by one bit.
| [in] | plane | pointer to the descriptor of the plane being processed |
| [in] | buf_sel | indicates which frame buffer the input data stored in |
| [out] | dst | pointer to the buffer receiving converted pixels |
| [in] | dst_pitch | pitch for moving to the next y line |
| [in] | dst_height | output plane height |
Definition at line 1032 of file indeo3.c.
Referenced by decode_frame(), and render_slice().
|
static |
|
static |
|
static |
|
static |
Definition at line 116 of file indeo3.c.
Referenced by build_requant_tab(), and decode_cell().
| const FFCodec ff_indeo3_decoder |