43 unsigned int index = level + 3;
55 unsigned int index = level + 31;
73 for (i = 0; i < 10; i++) {
77 if ((block[index + 0] = (block[index + 0] *
80 if ((block[index + 8] = (block[index + 8] *
83 if ((block[index + 1] = (block[index + 1] *
86 if ((block[index + 9] = (block[index + 9] *
91 for (; nc_count; nc_count--)
116 for (count = 63; count > 3; count--) {
128 for (i = 0; i <= count; i++) {
132 if ((block[index + 0] = (block[index + 0] *
135 if ((block[index + 8] = (block[index + 8] *
138 if ((block[index + 1] = (block[index + 1] *
141 if ((block[index + 9] = (block[index + 9] *
167 #define MAX_MB_SIZE (30 * 16 * 16 * 3 / 2 / 8) 179 for (i = 0; i < 6; i++)
182 for (i = 0; i < 6; i++) {
198 uint8_t *ptr_y = frame->
data[0] + (mb_y * 16 * linesize) + mb_x * 16;
206 for (i = 0; i < 4; i++)
212 for (i = 4; i < 6; i++)
218 const AVFrame *pict,
int *got_packet)
233 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
234 for (mb_x = 0; mb_x < a->
mb_width2; mb_x++) {
242 for (mb_y = 0; mb_y < a->
mb_height2; mb_y++) {
250 for (mb_x = 0; mb_x < a->
mb_width; mb_x++) {
265 (uint32_t *) pkt->
data, size);
268 for (i = 0; i < 4 *
size; i++)
272 pkt->
size = size * 4;
285 #if FF_API_CODED_FRAME 309 for (i = 0; i < 64; i++) {
317 #if CONFIG_ASV1_ENCODER 332 #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
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
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]
void(* bswap_buf)(uint32_t *dst, const uint32_t *src, int w)
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)
#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 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]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void(* get_pixels)(int16_t *block, const uint8_t *pixels, int line_size)
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. ...
int flags
AV_CODEC_FLAG_*.
static int encode_mb(ASV1Context *a, int16_t block[6][64])
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.
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.
static av_cold int encode_init(AVCodecContext *avctx)
void(* fdct)(int16_t *block)
static void asv1_encode_block(ASV1Context *a, int16_t block[64])
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
static void asv1_put_level(PutBitContext *pb, int level)
#define AVERROR_BUG
Bug detected, please report the issue.
static void dct_get(ASV1Context *a, const AVFrame *frame, int mb_x, int mb_y)
av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx)
static enum AVPixelFormat pix_fmts[]
int global_quality
Global quality for codecs which cannot change it per frame.
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)
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal api header.
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static av_cold int init(AVCodecParserContext *s)
#define FF_ENABLE_DEPRECATION_WARNINGS
int key_frame
1 -> keyframe, 0-> not
static void asv2_put_bits(PutBitContext *pb, int n, int v)
static int asv2_encode_block(ASV1Context *a, int16_t 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 ...