41 const uint8_t *src = avpkt->
data;
43 unsigned char_cols = avctx->
width >> 3;
44 unsigned char_rows = avctx->
height >> 3;
45 unsigned x, y, fg, bg, c;
55 if (avpkt->
size < 2*char_rows*char_cols) {
57 "Input buffer too small, truncated sample?\n");
69 for (y = 0; y < char_rows; y++) {
70 for (x = 0; x < char_cols; x++) {
int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
const uint8_t ff_cga_font[2048]
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
static int tmv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static int init(AVCodecParserContext *s)
#define 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. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
struct AVFrame AVFrame
Audio Video Frame.
static av_cold int tmv_decode_close(AVCodecContext *avctx)
void ff_draw_pc_font(uint8_t *dst, int linesize, const uint8_t *font, int font_height, int ch, int fg, int bg)
Draw CGA/EGA/VGA font to 8-bit pixel buffer.
struct TMVContext TMVContext
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void close(AVCodecParserContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int palette_has_changed
Tell user application that palette has changed from previous frame.
const uint32_t ff_cga_palette[16]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
8 bit with PIX_FMT_RGB32 palette
int key_frame
1 -> keyframe, 0-> not
static av_cold int tmv_decode_init(AVCodecContext *avctx)