Go to the documentation of this file.
23 #ifndef AVCODEC_MPEG4VIDEO_H
24 #define AVCODEC_MPEG4VIDEO_H
33 #define BIN_ONLY_SHAPE 2
36 #define SIMPLE_VO_TYPE 1
37 #define CORE_VO_TYPE 3
38 #define MAIN_VO_TYPE 4
39 #define NBIT_VO_TYPE 5
40 #define ARTS_VO_TYPE 10
41 #define ACE_VO_TYPE 12
42 #define SIMPLE_STUDIO_VO_TYPE 14
43 #define CORE_STUDIO_VO_TYPE 15
44 #define ADV_SIMPLE_VO_TYPE 17
46 #define VOT_VIDEO_ID 1
47 #define VOT_STILL_TEXTURE_ID 2
50 #define EXTENDED_PAR 15
53 #define STATIC_SPRITE 1
56 #define MOTION_MARKER 0x1F001
57 #define DC_MARKER 0x6B001
59 #define VOS_STARTCODE 0x1B0
60 #define USER_DATA_STARTCODE 0x1B2
61 #define GOP_STARTCODE 0x1B3
62 #define VISUAL_OBJ_STARTCODE 0x1B5
63 #define VOP_STARTCODE 0x1B6
64 #define SLICE_STARTCODE 0x1B7
65 #define EXT_STARTCODE 0x1B8
67 #define QUANT_MATRIX_EXT_ID 0x3
70 #define MAX_NVOP_SIZE 19
81 #if 0 //3IV1 is quite rare and it slows things down a tiny bit
82 #define IS_3IV1 s->codec_tag == AV_RL32("3IV1")
95 int *dir_ptr,
int encoding)
108 wrap =
s->block_wrap[n];
109 dc_val =
s->dc_val[0] +
s->block_index[n];
115 b = dc_val[-1 -
wrap];
120 if (
s->first_slice_line && n != 3) {
123 if (n != 1 &&
s->mb_x ==
s->resync_mb_x)
126 if (
s->mb_x ==
s->resync_mb_x &&
s->mb_y ==
s->resync_mb_y + 1) {
127 if (n == 0 || n == 4 || n == 5)
148 if (
level & (~2047)) {
152 "dc<0 at %dx%d\n",
s->mb_x,
s->mb_y);
157 "dc overflow at %dx%d\n",
s->mb_x,
s->mb_y);
void ff_mpeg4_init_direct_mv(MpegEncContext *s)
static av_always_inline float scale(float x, float s)
#define AV_EF_BITSTREAM
detect bitstream specification deviations
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my)
static int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level, int *dir_ptr, int encoding)
Predict the dc.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s)
static const float pred[4]
void ff_mpeg4_clean_buffers(MpegEncContext *s)
#define AV_EF_AGGRESSIVE
consider things that a sane encoder should not do as an error
#define AVERROR_INVALIDDATA
Invalid data found when processing input.