comparison mpegvideo.h @ 1421:340c90faa1dc libavcodec

mpeg2 encoding
author michaelni
date Mon, 25 Aug 2003 22:47:32 +0000
parents c2e63cb94d06
children efeed6e29f9b
comparison
equal deleted inserted replaced
1420:ff0220970711 1421:340c90faa1dc
46 #define MAX_FCODE 7 46 #define MAX_FCODE 7
47 #define MAX_MV 2048 47 #define MAX_MV 2048
48 48
49 #define MAX_PICTURE_COUNT 15 49 #define MAX_PICTURE_COUNT 15
50 50
51 #if 1
52 #define ME_MAP_SIZE 4096
53 #define ME_MAP_SHIFT 6
54 #else
51 #define ME_MAP_SIZE 64 55 #define ME_MAP_SIZE 64
52 #define ME_MAP_SHIFT 3 56 #define ME_MAP_SHIFT 3
57 #endif
53 #define ME_MAP_MV_BITS 11 58 #define ME_MAP_MV_BITS 11
54 59
55 /* run length table */ 60 /* run length table */
56 #define MAX_RUN 64 61 #define MAX_RUN 64
57 #define MAX_LEVEL 64 62 #define MAX_LEVEL 64
383 int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding 388 int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding
384 int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode b-frame encoding 389 int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode b-frame encoding
385 int me_method; ///< ME algorithm 390 int me_method; ///< ME algorithm
386 int scene_change_score; 391 int scene_change_score;
387 int mv_dir; 392 int mv_dir;
388 #define MV_DIR_BACKWARD 1 393 #define MV_DIR_L1 1
389 #define MV_DIR_FORWARD 2 394 #define MV_DIR_L0 2
395 #define MV_DIR_BACKWARD MV_DIR_L1
396 #define MV_DIR_FORWARD MV_DIR_L0
390 #define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4) 397 #define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)
391 int mv_type; 398 int mv_type;
392 #define MV_TYPE_16X16 0 ///< 1 vector for the whole mb 399 #define MV_TYPE_16X16 0 ///< 1 vector for the whole mb
393 #define MV_TYPE_8X8 1 ///< 4 vectors (h263, mpeg4 4MV) 400 #define MV_TYPE_8X8 1 ///< 4 vectors (h263, mpeg4 4MV)
394 #define MV_TYPE_16X8 2 ///< 2 vectors, one per 16x8 block 401 #define MV_TYPE_16X8 2 ///< 2 vectors, one per 16x8 block
566 PutBitContext pb2; ///< used for data partitioned VOPs 573 PutBitContext pb2; ///< used for data partitioned VOPs
567 #define PB_BUFFER_SIZE 1024*256 574 #define PB_BUFFER_SIZE 1024*256
568 uint8_t *tex_pb_buffer; 575 uint8_t *tex_pb_buffer;
569 uint8_t *pb2_buffer; 576 uint8_t *pb2_buffer;
570 int mpeg_quant; 577 int mpeg_quant;
578 #define FF_QUANT_DEFAULT 0
579 #define FF_QUANT_MPEG2 1
580 #define FF_QUANT_MPEG1 2
581 #define FF_QUANT_H263 3
582
571 int16_t (*field_mv_table)[2][2]; ///< used for interlaced b frame decoding 583 int16_t (*field_mv_table)[2][2]; ///< used for interlaced b frame decoding
572 int8_t (*field_select_table)[2]; ///< wtf, no really another table for interlaced b frames 584 int8_t (*field_select_table)[2]; ///< wtf, no really another table for interlaced b frames
573 int t_frame; ///< time distance of first I -> B, used for interlaced b frames 585 int t_frame; ///< time distance of first I -> B, used for interlaced b frames
574 int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG4 586 int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG4
575 587
642 int intra_vlc_format; 654 int intra_vlc_format;
643 int alternate_scan; 655 int alternate_scan;
644 int repeat_first_field; 656 int repeat_first_field;
645 int chroma_420_type; 657 int chroma_420_type;
646 int progressive_frame; 658 int progressive_frame;
647 int mpeg2;
648 int full_pel[2]; 659 int full_pel[2];
649 int interlaced_dct; 660 int interlaced_dct;
650 int first_slice; 661 int first_slice;
651 int first_field; ///< is 1 for the first field of a field picture 0 otherwise 662 int first_field; ///< is 1 for the first field of a field picture 0 otherwise
652 663
653 /* RTP specific */ 664 /* RTP specific */
654 /* These are explained on avcodec.h */ 665 /* These are explained on avcodec.h */
655 int rtp_mode; 666 int rtp_mode; //FIXME simplify this mess (remove callback, merge mode + payload)
656 int rtp_payload_size; 667 int rtp_payload_size;
657 void (*rtp_callback)(void *data, int size, int packet_number); 668 void (*rtp_callback)(void *data, int size, int packet_number);
658 uint8_t *ptr_lastgob; 669 uint8_t *ptr_lastgob;
659 670
660 DCTELEM (*block)[64]; ///< points to one of the following blocks 671 DCTELEM (*block)[64]; ///< points to one of the following blocks
868 int msmpeg4_decode_picture_header(MpegEncContext * s); 879 int msmpeg4_decode_picture_header(MpegEncContext * s);
869 int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size); 880 int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size);
870 int ff_msmpeg4_decode_init(MpegEncContext *s); 881 int ff_msmpeg4_decode_init(MpegEncContext *s);
871 void ff_msmpeg4_encode_init(MpegEncContext *s); 882 void ff_msmpeg4_encode_init(MpegEncContext *s);
872 int ff_wmv2_decode_picture_header(MpegEncContext * s); 883 int ff_wmv2_decode_picture_header(MpegEncContext * s);
884 int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s);
873 void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); 885 void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr);
874 void ff_mspel_motion(MpegEncContext *s, 886 void ff_mspel_motion(MpegEncContext *s,
875 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, 887 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
876 uint8_t **ref_picture, op_pixels_func (*pix_op)[4], 888 uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
877 int motion_x, int motion_y, int h); 889 int motion_x, int motion_y, int h);