38 #define ASV2_LEVEL_VLC_BITS 10
103 for (i = 0; i < 11; i++) {
109 if (ccp < 0 || i >= 10) {
146 for (i = 1; i < count + 1; i++) {
171 for (i = 0; i < 6; i++) {
176 for (i = 0; i < 6; i++) {
189 uint8_t *dest_y = frame->
data[0] + (mb_y * 16 * linesize) + mb_x * 16;
209 int buf_size = avpkt->
size;
225 (
const uint32_t *) buf, buf_size / 4);
228 for (i = 0; i < buf_size; i++)
234 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
235 for (mb_x = 0; mb_x < a->
mb_width2; mb_x++) {
245 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
255 for (mb_x = 0; mb_x < a->
mb_width; mb_x++) {
295 for (i = 0; i < 64; i++) {
315 #if CONFIG_ASV1_DECODER
329 #if CONFIG_ASV2_DECODER
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
const uint8_t ff_asv_ac_ccp_tab[16][2]
ptrdiff_t const GLvoid * data
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
Memory handling functions.
static av_cold int init(AVCodecContext *avctx)
#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size)
void(* clear_blocks)(int16_t *blocks)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end w...
static int asv2_decode_block(ASV1Context *a, int16_t block[64])
unsigned int bitstream_buffer_size
static int get_sbits(GetBitContext *s, int n)
Macro definitions for various function/variable attributes.
const uint8_t ff_asv2_level_tab[63][2]
static av_cold int decode_init(AVCodecContext *avctx)
uint8_t * bitstream_buffer
static VLC asv2_level_vlc
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
const uint8_t ff_asv_ccp_tab[17][2]
static int asv2_get_level(GetBitContext *gb)
static int get_bits_count(const GetBitContext *s)
const uint8_t ff_asv_dc_ccp_tab[8][2]
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
av_cold void ff_asv_common_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const uint8_t ff_reverse[256]
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
#define ASV2_LEVEL_VLC_BITS
uint16_t intra_matrix[64]
ASUS V1/V2 encoder/decoder common data.
static int asv2_get_bits(GetBitContext *gb, int n)
enum AVPictureType pict_type
Picture type of the frame.
static int decode_mb(ASV1Context *a, int16_t block[6][64])
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
uint8_t idct_permutation[64]
IDCT input permutation.
void(* idct_put)(uint8_t *dest, int line_size, int16_t *block)
block -> idct -> clip to unsigned 8 bit -> dest.
Libavcodec external API header.
av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
const uint16_t ff_mpeg1_default_intra_matrix[256]
static void idct_put(ASV1Context *a, AVFrame *frame, int mb_x, int mb_y)
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.
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
VLC_TYPE(* table)[2]
code, bits
static av_cold void init_vlcs(ASV1Context *a)
int key_frame
1 -> keyframe, 0-> not
static int asv1_get_level(GetBitContext *gb)
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
static int asv1_decode_block(ASV1Context *a, int16_t block[64])
const uint8_t ff_asv_scantab[64]
static av_cold int decode_end(AVCodecContext *avctx)
const uint8_t ff_asv_level_tab[7][2]
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.