41 for(mb_x=0; mb_x<s->
mb_width; mb_x++){
48 for(mb_x=0; mb_x<s->
mb_width; mb_x++){
56 for(mb_x=0; mb_x<s->
mb_width; mb_x++){
60 for(mb_x=0; mb_x<s->
mb_width; mb_x++){
67 for(mb_x=0; mb_x<s->
mb_width; mb_x++){
102 if(code==0)
return -1;
107 av_log(s->
avctx,
AV_LOG_DEBUG,
"fps:%d, br:%d, qpbit:%d, abt_flag:%d, j_type_bit:%d, tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, slices:%d\n",
173 }
else if(s->
qscale <= 20){
206 av_log(s->
avctx,
AV_LOG_DEBUG,
"rl:%d rlc:%d dc:%d mv:%d mbrl:%d qp:%d mspel:%d per_mb_abt:%d abt_type:%d cbp:%d ii:%d\n",
242 if((((*mx_ptr)|(*my_ptr)) & 1) && s->
mspel)
252 int xy,
wrap, diff, type;
253 int16_t *
A, *
B, *C, *mot_val;
296 static const int sub_cbp_table[3]= {2,3,1};
373 int val = ((code >> (5 - i)) & 1);
379 cbp |= val << (5 - i);
410 for (i = 0; i < 6; i++) {
421 ((cbp & 3) ? 1 : 0) +((cbp & 0x3C)? 2 : 0),
435 for (i = 0; i < 6; i++) {
static av_cold int wmv2_decode_init(AVCodecContext *avctx)
static av_cold int wmv2_decode_end(AVCodecContext *avctx)
int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64])
int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int16_t abt_block2[6][64]
static int wmv2_decode_inter_block(Wmv2Context *w, int16_t *block, int n, int cbp)
void(* clear_blocks)(int16_t *blocks)
int ff_msmpeg4_decode_init(AVCodecContext *avctx)
static int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr)
static int decode_ext_header(Wmv2Context *w)
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", 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)
#define MB_NON_INTRA_VLC_BITS
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
#define FF_DEBUG_PICT_INFO
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
Picture current_picture
copy of the current picture structure.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
int ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr)
const uint8_t * scantable
int mb_height
number of MBs horizontally & vertically
int ff_wmv2_decode_picture_header(MpegEncContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void parse_mb_skip(Wmv2Context *w)
int rl_chroma_table_index
int mb_skipped
MUST BE SET only during DECODING.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
av_cold void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
Initialize IntraX8 frame decoder.
av_cold void ff_intrax8_common_end(IntraX8Context *w)
Destroy IntraX8 frame structure.
int16_t(*[2] motion_val)[2]
Picture * current_picture_ptr
pointer to the current picture
ScanTable abt_scantable[2]
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
int block_last_index[12]
last non zero coefficient in block
static int16_t * wmv2_pred_motion(Wmv2Context *w, int *px, int *py)
int block_index[6]
index to current MB in block based arrays with edges
static const float pred[4]
#define MV_TYPE_16X16
1 vector for the whole mb
int first_slice_line
used in mpeg4 too to handle resync markers
Libavcodec external API header.
main external API structure.
static void close(AVCodecParserContext *s)
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define MB_INTRA_VLC_BITS
int slice_height
in macroblocks
int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant, int quant_offset)
Decode single IntraX8 frame.
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
int bit_rate
wanted bit rate
int mv[2][4][2]
motion vectors for a macroblock first coordinate : 0 = forward 1 = backward second " : depend...
int b8_stride
2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
struct AVCodecContext * avctx
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
int mb_stride
mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 ...
VLC ff_mb_non_intra_vlc[4]
static av_cold int init(AVCodecParserContext *s)
int ff_h263_decode_end(AVCodecContext *avctx)
av_cold void ff_wmv2_common_init(Wmv2Context *w)
int16_t(* block)[64]
points to one of the following blocks
static int decode012(GetBitContext *gb)
VLC_TYPE(* table)[2]
code, bits
int chroma_qscale
chroma QP
int ff_msmpeg4_decode_block(MpegEncContext *s, int16_t *block, int n, int coded, const uint8_t *scan_table)
#define INTER_INTRA_VLC_BITS
uint32_t * mb_type
types and macros are defined in mpegutils.h
ScanTable inter_scantable
if inter == intra then intra should be used to reduce tha cache usage
int ff_msmpeg4_coded_block_pred(MpegEncContext *s, int n, uint8_t **coded_block_ptr)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.
AVPixelFormat
Pixel format.