91 const int qscale = (215 - 2*
quant)*5;
105 void *
data,
int *data_size,
108 const uint8_t *buf = avpkt->
data;
109 int buf_size = avpkt->
size;
110 const uint8_t *buf_end = buf+buf_size;
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.
struct TqiContext TqiContext
const uint8_t ff_zigzag_direct[64]
static av_cold int tqi_decode_init(AVCodecContext *avctx)
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
av_cold void ff_mpeg12_init_vlcs(void)
#define DECLARE_ALIGNED(n, t, v)
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
static int tqi_decode_mb(MpegEncContext *s, DCTELEM(*block)[64])
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static av_cold int tqi_decode_end(AVCodecContext *avctx)
static int tqi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
bitstream reader API header.
uint8_t idct_permutation[64]
idct input permutation.
av_cold void dsputil_init(DSPContext *c, AVCodecContext *avctx)
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
static int init(AVCodecParserContext *s)
#define CODEC_FLAG_GRAY
Only decode/encode grayscale.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
const uint16_t ff_mpeg1_default_intra_matrix[64]
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int last_dc[3]
last DC values for MPEG1
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
void(* idct_put)(uint8_t *dest, int line_size, DCTELEM *block)
block -> idct -> clip to unsigned 8 bit -> dest.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n)
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
struct AVRational AVRational
rational number numerator/denominator
int width
picture width / height.
struct AVFrame AVFrame
Audio Video Frame.
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
const uint16_t ff_inv_aanscales[64]
main external API structure.
static void close(AVCodecParserContext *s)
ScanTable intra_scantable
static void tqi_idct_put(TqiContext *t, DCTELEM(*block)[64])
int height
picture size. must be a multiple of 16
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void tqi_calculate_qtable(MpegEncContext *s, int quant)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
DSPContext dsp
pointers for accelerated dsp functions
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
AAN (Arai Agui Nakajima) (I)DCT tables.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void(* clear_blocks)(DCTELEM *blocks)
struct AVCodecContext * avctx
unsigned int bitstream_buf_size
void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
uint16_t intra_matrix[64]
matrix transmitted in the bitstream