45 unsigned int index = level + 3;
57 unsigned int index = level + 31;
63 if (level < -128 || level > 127) {
65 level = av_clip_int8(level);
79 for (i = 0; i < 10; i++) {
83 if ((block[index + 0] = (block[index + 0] *
86 if ((block[index + 8] = (block[index + 8] *
89 if ((block[index + 1] = (block[index + 1] *
92 if ((block[index + 9] = (block[index + 9] *
97 for (; nc_count; nc_count--)
122 for (count = 63; count > 3; count--) {
134 for (i = 0; i <=
count; i++) {
138 if ((block[index + 0] = (block[index + 0] *
141 if ((block[index + 8] = (block[index + 8] *
144 if ((block[index + 1] = (block[index + 1] *
147 if ((block[index + 9] = (block[index + 9] *
170 #define MAX_MB_SIZE (30 * 16 * 16 * 3 / 2 / 8)
182 for (i = 0; i < 6; i++)
185 for (i = 0; i < 6; i++) {
199 uint8_t *ptr_y = frame->
data[0] + (mb_y * 16 * linesize) + mb_x * 16;
207 for (i = 0; i < 4; i++)
213 for (i = 4; i < 6; i++)
219 const AVFrame *pict,
int *got_packet)
246 for (i = 0; i<3; i++) {
273 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
274 for (mb_x = 0; mb_x < a->
mb_width2; mb_x++) {
282 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
290 for (mb_x = 0; mb_x < a->
mb_width; mb_x++) {
305 (uint32_t *) pkt->
data, size);
308 for (i = 0; i < 4 *
size; i++)
312 pkt->
size = size * 4;
342 for (i = 0; i < 64; i++) {
355 #if CONFIG_ASV1_ENCODER
370 #if CONFIG_ASV2_ENCODER
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
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]
void ff_fdct_ifast(int16_t *data)
static void put_sbits(PutBitContext *pb, int n, int32_t value)
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
#define AV_LOG_WARNING
Something somehow does not look correct.
Memory handling functions.
static av_cold int init(AVCodecContext *avctx)
const uint8_t ff_reverse[256]
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx)
Macro definitions for various function/variable attributes.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
const uint8_t ff_asv2_level_tab[63][2]
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
const uint8_t ff_asv_ccp_tab[17][2]
const uint16_t ff_aanscales[64]
const uint8_t ff_asv_dc_ccp_tab[8][2]
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
#define AV_INPUT_BUFFER_MIN_SIZE
minimum encoding buffer size Used to avoid some checks during header writing.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int width
width and height of the video frame
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
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(* get_pixels)(int16_t *av_restrict block, const uint8_t *pixels, ptrdiff_t stride)
int flags
AV_CODEC_FLAG_*.
static int encode_mb(ASV1Context *a, int16_t block[6][64])
const char * name
Name of the codec implementation.
av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx)
ASUS V1/V2 encoder/decoder common data.
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
int flags
A combination of AV_PKT_FLAG values.
static int put_bits_count(PutBitContext *s)
static av_cold int encode_init(AVCodecContext *avctx)
static void asv1_encode_block(ASV1Context *a, int16_t block[64])
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
void(* fdct)(int16_t *block)
main external API structure.
static void asv1_put_level(PutBitContext *pb, int level)
static void dct_get(ASV1Context *a, const AVFrame *frame, int mb_x, int mb_y)
const uint16_t ff_mpeg1_default_intra_matrix[256]
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
static enum AVPixelFormat pix_fmts[]
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
int global_quality
Global quality for codecs which cannot change it per frame.
AAN (Arai, Agui and 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 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.
static void asv2_put_bits(PutBitContext *pb, int n, int v)
static void asv2_put_level(ASV1Context *a, PutBitContext *pb, int level)
const uint8_t ff_asv_scantab[64]
const uint8_t ff_asv_level_tab[7][2]
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
AVPixelFormat
Pixel format.
This structure stores compressed data.
#define AV_CEIL_RSHIFT(a, b)