42 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
43 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
49 for (mb_x = 0; mb_x < s->
mb_width; mb_x++)
54 for (mb_y = 0; mb_y < s->
mb_height; mb_y++) {
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++) {
69 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
73 for (mb_y = 0; mb_y < s->
mb_height; mb_y++)
111 "fps:%d, br:%"PRId64
", qpbit:%d, abt_flag:%d, j_type_bit:%d, "
112 "tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, "
167 "qscale:%d rlc:%d rl:%d dc:%d mbrl:%d j_type:%d \n",
208 "rl:%d rlc:%d dc:%d mv:%d mbrl:%d qp:%d mspel:%d "
209 "per_mb_abt:%d abt_type:%d cbp:%d ii:%d\n",
239 if ((((*mx_ptr) | (*my_ptr)) & 1) && s->
mspel)
251 int16_t *
A, *
B, *
C, *mot_val;
275 }
else if (type == 1) {
296 static const int sub_cbp_table[3] = { 2, 3, 1 };
335 int cbp, code, i, ret;
345 for (i = 0; i < 6; i++)
368 "II-cbp illegal at %d %d\n", s->
mb_x, s->
mb_y);
373 for (i = 0; i < 6; i++) {
374 int val = ((code >> (5 - i)) & 1);
380 cbp |= val << (5 - i);
411 for (i = 0; i < 6; i++) {
414 "\nerror while decoding inter block: %d x %d (%d)\n",
423 ((cbp & 3) ? 1 : 0) + ((cbp & 0x3C) ? 2 : 0),
438 for (i = 0; i < 6; i++) {
441 "\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
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.
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.
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
Libavcodec external API header.
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_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.
#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 mpeg4 too to handle resync markers
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 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, ...
static enum AVPixelFormat pix_fmts[]
#define FF_DEBUG_PICT_INFO
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
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
#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 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.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.