#define NBIT_VO_TYPE 5
#define ARTS_VO_TYPE 10
#define ACE_VO_TYPE 12
+#define SIMPLE_STUDIO_VO_TYPE 14
+#define CORE_STUDIO_VO_TYPE 15
#define ADV_SIMPLE_VO_TYPE 17
#define VOT_VIDEO_ID 1
#define GOP_STARTCODE 0x1B3
#define VISUAL_OBJ_STARTCODE 0x1B5
#define VOP_STARTCODE 0x1B6
+#define SLICE_STARTCODE 0x1B7
+#define EXT_STARTCODE 0x1B8
+
+#define QUANT_MATRIX_EXT_ID 0x3
/* smaller packets likely don't contain a real frame */
#define MAX_NVOP_SIZE 19
int cplx_estimation_trash_i;
int cplx_estimation_trash_p;
int cplx_estimation_trash_b;
+
+ int rgb;
} Mpeg4DecContext;
+static const uint8_t mpeg4_block_count[4] = {0, 6, 8, 12};
+
/* dc encoding for MPEG-4 */
extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
extern const int8_t ff_mpeg4_intra_run[102];
extern RLTable ff_mpeg4_rl_intra;
+void ff_mpeg4_init_rl_intra(void);
/* Note this is identical to the intra rvlc except that it is reordered. */
extern RLTable ff_rvlc_rl_inter;
extern RLTable ff_rvlc_rl_intra;
-extern const uint16_t ff_sprite_trajectory_tab[15][2];
+extern const uint8_t ff_sprite_trajectory_lens[15];
extern const uint8_t ff_mb_type_b_tab[4][2];
/* these matrixes will be permuted for the idct */
extern const uint8_t ff_mpeg4_dc_threshold[8];
+extern const uint8_t ff_mpeg4_studio_dc_luma[19][2];
+extern const uint8_t ff_mpeg4_studio_dc_chroma[19][2];
+extern const uint8_t ff_mpeg4_studio_intra[12][24][2];
+
void ff_mpeg4_encode_mb(MpegEncContext *s,
int16_t block[6][64],
int motion_x, int motion_y);
void ff_set_mpeg4_time(MpegEncContext *s);
int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number);
-int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb);
+int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb, int header);
void ff_mpeg4_encode_video_packet_header(MpegEncContext *s);
void ff_mpeg4_clean_buffers(MpegEncContext *s);
void ff_mpeg4_stuffing(PutBitContext *pbc);
int ff_mpeg4_decode_partitions(Mpeg4DecContext *ctx);
int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s);
int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx);
+int ff_mpeg4_decode_studio_slice_header(Mpeg4DecContext *ctx);
void ff_mpeg4_init_direct_mv(MpegEncContext *s);
void ff_mpeg4videodec_static_init(void);
int ff_mpeg4_workaround_bugs(AVCodecContext *avctx);
*/
int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my);
-extern uint8_t ff_mpeg4_static_rl_table_store[3][2][2 * MAX_RUN + MAX_LEVEL + 3];
-
#if 0 //3IV1 is quite rare and it slows things down a tiny bit
#define IS_3IV1 s->codec_tag == AV_RL32("3IV1")
#else
if (level < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"dc<0 at %dx%d\n", s->mb_x, s->mb_y);
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (level > 2048 + scale) {
av_log(s->avctx, AV_LOG_ERROR,
"dc overflow at %dx%d\n", s->mb_x, s->mb_y);
- return -1;
+ return AVERROR_INVALIDDATA;
}
}
if (level < 0)