42 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
43 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
50 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
51 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
56 for (mb_y = 0; mb_y < s->
mb_height; mb_y++) {
60 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
64 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
71 for (mb_x = 0; mb_x < s->
mb_width; mb_x++) {
75 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
79 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
118 "fps:%d, br:%"PRId64
", qpbit:%d, abt_flag:%d, j_type_bit:%d, "
119 "tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, "
174 "qscale:%d rlc:%d rl:%d dc:%d mbrl:%d j_type:%d \n",
218 "rl:%d rlc:%d dc:%d mv:%d mbrl:%d qp:%d mspel:%d "
219 "per_mb_abt:%d abt_type:%d cbp:%d ii:%d\n",
256 if ((((*mx_ptr) | (*my_ptr)) & 1) && s->
mspel)
268 int16_t *
A, *
B, *
C, *mot_val;
292 }
else if (type == 1) {
313 static const int sub_cbp_table[3] = { 2, 3, 1 };
352 int cbp, code, i, ret;
362 for (i = 0; i < 6; i++)
389 "II-cbp illegal at %d %d\n", s->
mb_x, s->
mb_y);
394 for (i = 0; i < 6; i++) {
395 int val = ((code >> (5 - i)) & 1);
401 cbp |= val << (5 - i);
432 for (i = 0; i < 6; i++) {
435 "\nerror while decoding inter block: %d x %d (%d)\n",
444 ((cbp & 3) ? 1 : 0) + ((cbp & 0x3C) ? 2 : 0),
459 for (i = 0; i < 6; i++) {
462 "\nerror while decoding intra block: %d x %d (%d)\n",
static av_cold int wmv2_decode_init(AVCodecContext *avctx)
const char const char void * val
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_always_inline int wmv2_get_cbp_table_index(MpegEncContext *s, int cbp_index)
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.
int ff_msmpeg4_decode_init(AVCodecContext *avctx)
int16_t abt_block2[6][64]
static int wmv2_decode_inter_block(Wmv2Context *w, int16_t *block, int n, int cbp)
static av_cold int init(AVCodecContext *avctx)
void(* clear_blocks)(int16_t *blocks)
static int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr)
static int decode_ext_header(Wmv2Context *w)
#define MB_NON_INTRA_VLC_BITS
av_cold int ff_intrax8_common_init(AVCodecContext *avctx, IntraX8Context *w, IDCTDSPContext *idsp, int16_t(*block)[64], int block_last_index[12], int mb_width, int mb_height)
Initialize IntraX8 frame decoder.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#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 (MPEG-4, msmpeg4, ...) for B-frames rounding mode is always ...
Picture current_picture
copy of the current picture structure.
int ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr)
int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, GetBitContext *gb, int *mb_x, int *mb_y, int dquant, int quant_offset, int loopfilter, int lowdelay)
Decode single IntraX8 frame.
const uint8_t * scantable
int mb_height
number of MBs horizontally & vertically
static int get_bits_left(GetBitContext *gb)
int ff_wmv2_decode_picture_header(MpegEncContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy, int status)
Add a slice.
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.
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
int low_delay
no reordering needed / has no B-frames
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
av_cold void ff_intrax8_common_end(IntraX8Context *w)
Destroy IntraX8 frame structure.
static int parse_mb_skip(Wmv2Context *w)
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.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
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 MPEG-4 too to handle resync markers
Libavcodec external API header.
main external API structure.
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 pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
static enum AVPixelFormat pix_fmts[]
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
#define CODEC_FLAG_EMU_EDGE
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
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]
int ff_h263_decode_end(AVCodecContext *avctx)
static av_always_inline int diff(const uint32_t a, const uint32_t b)
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
int64_t bit_rate
wanted bit rate
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 the 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.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.