39 unsigned int index= level + 3;
49 unsigned int index= level + 31;
69 if( (block[index + 0] = (block[index + 0]*a->
q_intra_matrix[index + 0] + (1<<15))>>16) ) ccp |= 8;
70 if( (block[index + 8] = (block[index + 8]*a->
q_intra_matrix[index + 8] + (1<<15))>>16) ) ccp |= 4;
71 if( (block[index + 1] = (block[index + 1]*a->
q_intra_matrix[index + 1] + (1<<15))>>16) ) ccp |= 2;
72 if( (block[index + 9] = (block[index + 9]*a->
q_intra_matrix[index + 9] + (1<<15))>>16) ) ccp |= 1;
75 for(;nc_count; nc_count--)
95 for(count=63; count>3; count--){
108 for(i=0; i<=count; i++){
112 if( (block[index + 0] = (block[index + 0]*a->
q_intra_matrix[index + 0] + (1<<15))>>16) ) ccp |= 8;
113 if( (block[index + 8] = (block[index + 8]*a->
q_intra_matrix[index + 8] + (1<<15))>>16) ) ccp |= 4;
114 if( (block[index + 1] = (block[index + 1]*a->
q_intra_matrix[index + 1] + (1<<15))>>16) ) ccp |= 2;
115 if( (block[index + 9] = (block[index + 9]*a->
q_intra_matrix[index + 9] + (1<<15))>>16) ) ccp |= 1;
130 #define MAX_MB_SIZE (30*16*16*3/2/8)
175 const AVFrame *pict,
int *got_packet)
212 for(mb_x=0; mb_x<a->
mb_width; mb_x++){
229 for(i=0; i<4*
size; i++)
264 #if CONFIG_ASV1_ENCODER
278 #if CONFIG_ASV2_ENCODER
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
This structure describes decoded (raw) audio or video data.
const uint8_t ff_asv_ac_ccp_tab[16][2]
static void put_sbits(PutBitContext *pb, int n, int32_t value)
memory handling functions
#define FF_MIN_BUFFER_SIZE
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
Macro definitions for various function/variable attributes.
const uint8_t ff_asv2_level_tab[63][2]
void(* get_pixels)(DCTELEM *block, const uint8_t *pixels, int line_size)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
const uint8_t ff_asv_ccp_tab[17][2]
const uint8_t ff_asv_dc_ccp_tab[8][2]
static void asv2_put_level(PutBitContext *pb, int level)
static int init(AVCodecParserContext *s)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
const uint16_t ff_mpeg1_default_intra_matrix[64]
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
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. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static void put_bits(PutBitContext *s, int n, unsigned int value)
Write up to 31 bits into a bitstream.
ASUS V1/V2 encoder/decoder common data.
struct ASV1Context ASV1Context
int flags
A combination of AV_PKT_FLAG values.
static int put_bits_count(PutBitContext *s)
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
static av_cold int encode_init(AVCodecContext *avctx)
static void dct_get(ASV1Context *a, int mb_x, int mb_y)
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void asv1_put_level(PutBitContext *pb, int level)
static void asv1_encode_block(ASV1Context *a, DCTELEM block[64])
int global_quality
Global quality for codecs which cannot change it per frame.
static const uint16_t scale[4]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int encode_mb(ASV1Context *a, DCTELEM block[6][64])
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
void(* fdct)(DCTELEM *block)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
int key_frame
1 -> keyframe, 0-> not
static void asv2_put_bits(PutBitContext *pb, int n, int v)
static void asv2_encode_block(ASV1Context *a, DCTELEM block[64])
const uint8_t ff_reverse[256]
const uint8_t ff_asv_scantab[64]
const uint8_t ff_asv_level_tab[7][2]
AVPixelFormat
Pixel format.
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...