FFmpeg
|
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "copy_block.h"
#include "codec_internal.h"
#include "decode.h"
Go to the source code of this file.
Data Structures | |
struct | SANMVideoContext |
struct | SANMFrameHeader |
Macros | |
#define | NGLYPHS 256 |
#define | GLYPH_COORD_VECT_SIZE 16 |
#define | PALETTE_SIZE 256 |
#define | PALETTE_DELTA 768 |
Typedefs | |
typedef int(* | frm_decoder) (SANMVideoContext *ctx) |
Enumerations | |
enum | GlyphEdge { LEFT_EDGE, TOP_EDGE, RIGHT_EDGE, BOTTOM_EDGE, NO_EDGE } |
enum | GlyphDir { DIR_LEFT, DIR_UP, DIR_RIGHT, DIR_DOWN, NO_DIR } |
Functions | |
static enum GlyphEdge | which_edge (int x, int y, int edge_size) |
Return enum GlyphEdge of box where point (x, y) lies. More... | |
static enum GlyphDir | which_direction (enum GlyphEdge edge0, enum GlyphEdge edge1) |
static void | interp_point (int8_t *points, int x0, int y0, int x1, int y1, int pos, int npoints) |
static void | make_glyphs (int8_t *pglyphs, const int8_t *xvec, const int8_t *yvec, const int side_length) |
Construct glyphs by iterating through vector coordinates. More... | |
static void | init_sizes (SANMVideoContext *ctx, int width, int height) |
static void | destroy_buffers (SANMVideoContext *ctx) |
static av_cold int | init_buffers (SANMVideoContext *ctx) |
static void | rotate_bufs (SANMVideoContext *ctx, int rotate_code) |
static av_cold int | decode_init (AVCodecContext *avctx) |
static av_cold int | decode_end (AVCodecContext *avctx) |
static int | rle_decode (SANMVideoContext *ctx, uint8_t *dst, const int out_size) |
static int | old_codec1 (SANMVideoContext *ctx, int top, int left, int width, int height) |
static void | codec37_mv (uint8_t *dst, const uint8_t *src, int height, int stride, int x, int y) |
static int | old_codec37 (SANMVideoContext *ctx, int top, int left, int width, int height) |
static int | process_block (SANMVideoContext *ctx, uint8_t *dst, uint8_t *prev1, uint8_t *prev2, int stride, int tbl, int size) |
static void | codec47_read_interptable (SANMVideoContext *ctx) |
static void | codec47_comp1 (SANMVideoContext *ctx, uint8_t *dst_in, int width, int height, ptrdiff_t stride) |
static int | old_codec47 (SANMVideoContext *ctx, int top, int left, int width, int height) |
static int | process_frame_obj (SANMVideoContext *ctx) |
static int | process_xpal (SANMVideoContext *ctx, int size) |
static int | decode_0 (SANMVideoContext *ctx) |
static int | decode_nop (SANMVideoContext *ctx) |
static void | copy_block (uint16_t *pdest, uint16_t *psrc, int block_size, ptrdiff_t pitch) |
static void | fill_block (uint16_t *pdest, uint16_t color, int block_size, ptrdiff_t pitch) |
static int | draw_glyph (SANMVideoContext *ctx, uint16_t *dst, int index, uint16_t fg_color, uint16_t bg_color, int block_size, ptrdiff_t pitch) |
static int | opcode_0xf7 (SANMVideoContext *ctx, int cx, int cy, int block_size, ptrdiff_t pitch) |
static int | opcode_0xf8 (SANMVideoContext *ctx, int cx, int cy, int block_size, ptrdiff_t pitch) |
static int | good_mvec (SANMVideoContext *ctx, int cx, int cy, int mx, int my, int block_size) |
static int | codec2subblock (SANMVideoContext *ctx, int cx, int cy, int blk_size) |
static int | decode_2 (SANMVideoContext *ctx) |
static int | decode_3 (SANMVideoContext *ctx) |
static int | decode_4 (SANMVideoContext *ctx) |
static int | decode_5 (SANMVideoContext *ctx) |
static int | decode_6 (SANMVideoContext *ctx) |
static int | decode_8 (SANMVideoContext *ctx) |
static int | read_frame_header (SANMVideoContext *ctx, SANMFrameHeader *hdr) |
static void | fill_frame (uint16_t *pbuf, int buf_size, uint16_t color) |
static int | copy_output (SANMVideoContext *ctx, SANMFrameHeader *hdr) |
static int | decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt) |
Variables | |
static const int8_t | glyph4_x [GLYPH_COORD_VECT_SIZE] |
static const int8_t | glyph4_y [GLYPH_COORD_VECT_SIZE] |
static const int8_t | glyph8_x [GLYPH_COORD_VECT_SIZE] |
static const int8_t | glyph8_y [GLYPH_COORD_VECT_SIZE] |
static const int8_t | motion_vectors [256][2] |
static const int8_t | c37_mv [] |
static const frm_decoder | v1_decoders [] |
const FFCodec | ff_sanm_decoder |
typedef int(* frm_decoder) (SANMVideoContext *ctx) |
enum GlyphEdge |
enum GlyphDir |
|
static |
Return enum GlyphEdge of box where point (x, y) lies.
x | x point coordinate |
y | y point coordinate |
edge_size | box width/height. |
Definition at line 327 of file sanm.c.
Referenced by make_glyphs().
Definition at line 343 of file sanm.c.
Referenced by make_glyphs().
|
static |
Definition at line 366 of file sanm.c.
Referenced by make_glyphs().
|
static |
Construct glyphs by iterating through vector coordinates.
pglyphs | pointer to table where glyphs are stored |
xvec | pointer to x component of vector coordinates |
yvec | pointer to y component of vector coordinates |
side_length | glyph width/height. |
Definition at line 386 of file sanm.c.
Referenced by decode_init().
|
static |
Definition at line 438 of file sanm.c.
Referenced by decode_init(), destroy_buffers(), and process_frame_obj().
|
static |
Definition at line 451 of file sanm.c.
Referenced by decode_end(), and init_buffers().
|
static |
Definition at line 464 of file sanm.c.
Referenced by decode_init(), and process_frame_obj().
|
static |
Definition at line 482 of file sanm.c.
Referenced by decode_frame(), and old_codec37().
|
static |
|
static |
|
static |
Definition at line 532 of file sanm.c.
Referenced by decode_5(), decode_8(), old_codec37(), and old_codec47().
|
static |
Definition at line 558 of file sanm.c.
Referenced by process_frame_obj().
|
inlinestatic |
Definition at line 605 of file sanm.c.
Referenced by old_codec37().
|
static |
Definition at line 624 of file sanm.c.
Referenced by process_frame_obj().
|
static |
Definition at line 770 of file sanm.c.
Referenced by old_codec47().
|
static |
Definition at line 860 of file sanm.c.
Referenced by old_codec47().
|
static |
Definition at line 876 of file sanm.c.
Referenced by old_codec47().
|
static |
Definition at line 909 of file sanm.c.
Referenced by process_frame_obj().
|
static |
Definition at line 998 of file sanm.c.
Referenced by decode_frame().
|
static |
Definition at line 1039 of file sanm.c.
Referenced by decode_frame().
|
static |
|
static |
|
static |
Definition at line 1101 of file sanm.c.
Referenced by codec2subblock().
|
static |
Definition at line 1120 of file sanm.c.
Referenced by codec2subblock().
|
static |
Definition at line 1130 of file sanm.c.
Referenced by opcode_0xf7(), and opcode_0xf8().
|
static |
Definition at line 1152 of file sanm.c.
Referenced by codec2subblock().
|
static |
Definition at line 1186 of file sanm.c.
Referenced by codec2subblock().
|
static |
Definition at line 1214 of file sanm.c.
Referenced by codec2subblock().
|
static |
Definition at line 1230 of file sanm.c.
Referenced by decode_2().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1406 of file sanm.c.
Referenced by decode_frame().
|
static |
Definition at line 1446 of file sanm.c.
Referenced by decode_frame().
|
static |
Definition at line 1454 of file sanm.c.
Referenced by decode_frame().
|
static |
|
static |
Definition at line 37 of file sanm.c.
Referenced by decode_init().
|
static |
Definition at line 41 of file sanm.c.
Referenced by decode_init().
|
static |
Definition at line 45 of file sanm.c.
Referenced by decode_init().
|
static |
Definition at line 49 of file sanm.c.
Referenced by decode_init().
|
static |
Definition at line 53 of file sanm.c.
Referenced by codec2subblock(), and process_block().
|
static |
Definition at line 107 of file sanm.c.
Referenced by old_codec37().
|
static |
Definition at line 1401 of file sanm.c.
Referenced by decode_frame().
const FFCodec ff_sanm_decoder |