#define LIBAVCODEC_VERSION_INT 0x000406
#define LIBAVCODEC_VERSION "0.4.6"
-#define LIBAVCODEC_BUILD 4635
-#define LIBAVCODEC_BUILD_STR "4635"
+#define LIBAVCODEC_BUILD 4636
+#define LIBAVCODEC_BUILD_STR "4636"
enum CodecID {
CODEC_ID_NONE,
#define CODEC_FLAG_4MV 0x0004 /* 4 MV per MB allowed */
#define CODEC_FLAG_QPEL 0x0010 /* use qpel MC */
#define CODEC_FLAG_GMC 0x0020 /* use GMC */
-#define CODEC_FLAG_TYPE 0x0040 /* fixed I/P frame type, from avctx->key_frame */
#define CODEC_FLAG_PART 0x0080 /* use data partitioning */
/* parent program gurantees that the input for b-frame containing streams is not written to
for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */
* decoding: set by lavc
*/
int8_t *display_qscale_table;
+
+ /**
+ * force specific pict_type.
+ * encoding; set by user (I/P/B_TYPE)
+ * decoding: unused
+ */
+ int force_type;
} AVCodecContext;
typedef struct AVCodec {
/* divx501 bitstream reorder buffer */
CHECKED_ALLOCZ(s->bitstream_buffer, BITSTREAM_BUFFER_SIZE);
-
+
/* cbp, ac_pred, pred_dir */
CHECKED_ALLOCZ(s->cbp_table , s->mb_num * sizeof(UINT8))
CHECKED_ALLOCZ(s->pred_dir_table, s->mb_num * sizeof(UINT8))
init_put_bits(&s->pb, buf, buf_size, NULL, NULL);
- if(avctx->flags&CODEC_FLAG_TYPE){
+ if(avctx->force_type){
s->input_pict_type=
- s->force_input_type= avctx->key_frame ? I_TYPE : P_TYPE;
+ s->force_input_type= avctx->force_type;
}else if(s->flags&CODEC_FLAG_PASS2){
s->input_pict_type=
s->force_input_type= s->rc_context.entry[s->input_picture_number].new_pict_type;