32 #define BITSTREAM_READER_LE
77 for(j=0; j<value; j++)
82 block[perm[i]] = -s->
qtable[perm[i]];
87 block[perm[i]] = s->
qtable[perm[i]];
123 int level = av_clip_uint8((dc*s->
qtable[0] + 2056)>>4);
126 memset(dst+j*dst_stride, level, 8);
137 tgq_dconly(s,dest_y + 8*linesize , linesize, dc[2]);
138 tgq_dconly(s,dest_y + 8*linesize + 8, linesize, dc[3]);
150 mode = bytestream2_get_byte(&s->
gb);
160 memset(dc, bytestream2_get_byte(&s->
gb), 4);
161 dc[4] = bytestream2_get_byte(&s->
gb);
162 dc[5] = bytestream2_get_byte(&s->
gb);
165 }
else if (mode==12) {
166 for (i = 0; i < 6; i++) {
167 dc[i] = bytestream2_get_byte(&s->
gb);
179 const int a = (14*(100-
quant))/100 + 1;
180 const int b = (11*(100-
quant))/100 + 4;
187 void *
data,
int *got_frame,
190 int buf_size = avpkt->
size;
193 int big_endian =
AV_RL32(&buf[4]) > 0x000FFFFF;
201 s->
width = bytestream2_get_be16u(&s->
gb);
202 s->
height = bytestream2_get_be16u(&s->
gb);
204 s->
width = bytestream2_get_le16u(&s->
gb);
205 s->
height = bytestream2_get_le16u(&s->
gb);
const uint8_t ff_zigzag_direct[64]
This structure describes decoded (raw) audio or video data.
int buffer_hints
codec suggestion on buffer type if != 0
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static int get_sbits(GetBitContext *s, int n)
static av_cold int tgq_decode_init(AVCodecContext *avctx)
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)
static void tgq_idct_put_mb_dconly(TgqContext *s, int mb_x, int mb_y, const int8_t *dc)
bitstream reader API header.
static int init(AVCodecParserContext *s)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static void tgq_decode_block(TgqContext *s, DCTELEM block[64], GetBitContext *gb)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static void tgq_dconly(TgqContext *s, unsigned char *dst, int dst_stride, int dc)
struct TgqContext TgqContext
const uint8_t * buffer_end
struct AVRational AVRational
rational number numerator/denominator
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
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)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
void ff_init_scantable_permutation(uint8_t *idct_permutation, int idct_permutation_type)
#define DECLARE_ALIGNED(n, t, v)
AAN (Arai Agui Nakajima) (I)DCT tables.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
static void tgq_idct_put_mb(TgqContext *s, DCTELEM(*block)[64], int mb_x, int mb_y)
void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block)
static av_cold int tgq_decode_end(AVCodecContext *avctx)
void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
int key_frame
1 -> keyframe, 0-> not
static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x)
#define FF_BUFFER_HINTS_VALID
static void tgq_calculate_qtable(TgqContext *s, int quant)
static int tgq_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure stores compressed data.