26 #include "libavutil/attributes.h"
27 #include "libavutil/mem.h"
40 unsigned int index= level + 3;
50 unsigned int index= level + 31;
70 if( (block[index + 0] = (block[index + 0]*a->
q_intra_matrix[index + 0] + (1<<15))>>16) ) ccp |= 8;
71 if( (block[index + 8] = (block[index + 8]*a->
q_intra_matrix[index + 8] + (1<<15))>>16) ) ccp |= 4;
72 if( (block[index + 1] = (block[index + 1]*a->
q_intra_matrix[index + 1] + (1<<15))>>16) ) ccp |= 2;
73 if( (block[index + 9] = (block[index + 9]*a->
q_intra_matrix[index + 9] + (1<<15))>>16) ) ccp |= 1;
76 for(;nc_count; nc_count--)
96 for(count=63; count>3; count--){
109 for(i=0; i<=
count; i++){
113 if( (block[index + 0] = (block[index + 0]*a->
q_intra_matrix[index + 0] + (1<<15))>>16) ) ccp |= 8;
114 if( (block[index + 8] = (block[index + 8]*a->
q_intra_matrix[index + 8] + (1<<15))>>16) ) ccp |= 4;
115 if( (block[index + 1] = (block[index + 1]*a->
q_intra_matrix[index + 1] + (1<<15))>>16) ) ccp |= 2;
116 if( (block[index + 9] = (block[index + 9]*a->
q_intra_matrix[index + 9] + (1<<15))>>16) ) ccp |= 1;
131 #define MAX_MB_SIZE (30*16*16*3/2/8)
176 const AVFrame *pict,
int *got_packet)
210 for(mb_x=0; mb_x<a->
mb_width; mb_x++){
227 for(i=0; i<4*
size; i++)
262 #if CONFIG_ASV1_ENCODER
276 #if CONFIG_ASV2_ENCODER
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
Check AVPacket size and/or allocate data.
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)
void(* get_pixels)(int16_t *block, const uint8_t *pixels, int line_size)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static av_cold int init(AVCodecContext *avctx)
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
const uint8_t ff_asv2_level_tab[63][2]
const char * name
Name of the codec implementation.
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)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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. ...
static int encode_mb(ASV1Context *a, int16_t block[6][64])
ASUS V1/V2 encoder/decoder common data.
Libavcodec external API header.
AVPixelFormat
Pixel format.
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.
#define FF_MIN_BUFFER_SIZE
minimum encoding buffer size Used to avoid some checks during header writing.
static av_cold int encode_init(AVCodecContext *avctx)
int AC3_NAME() encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static void dct_get(ASV1Context *a, int mb_x, int mb_y)
static void asv1_encode_block(ASV1Context *a, int16_t block[64])
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
main external API structure.
static void asv1_put_level(PutBitContext *pb, int level)
const uint16_t ff_mpeg1_default_intra_matrix[256]
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int global_quality
Global quality for codecs which cannot change it per frame.
static const uint16_t scale[4]
common internal api header.
#define CODEC_FLAG_GRAY
Only decode/encode grayscale.
static void asv2_encode_block(ASV1Context *a, int16_t block[64])
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
void(* fdct)(int16_t *block)
int key_frame
1 -> keyframe, 0-> not
static void asv2_put_bits(PutBitContext *pb, int n, int v)
const uint8_t ff_reverse[256]
const uint8_t ff_asv_scantab[64]
const uint8_t ff_asv_level_tab[7][2]
This structure stores compressed data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void * av_mallocz(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.