FRAME_SKIPPED -> h263dec.h CANDIDATE_MB_TYPE_* -> mpegvideoenc.h INPLACE_OFFSET -> mpegvideoenc.h enum OutputFormat -> mpegvideo.h
Unified · Split
| @@ -42,7 +42,6 @@ · 41 unmodified lines | |||
| 42 | #include "mpeg4video.h" | 42 | #include "mpeg4video.h" |
| 43 | #include "mpeg4videodec.h" | 43 | #include "mpeg4videodec.h" |
| 44 | #include "mpeg4videodefs.h" | 44 | #include "mpeg4videodefs.h" |
| 45 | #include "mpegutils.h" | ||
| 46 | #include "mpegvideo.h" | 45 | #include "mpegvideo.h" |
| 47 | #include "mpegvideodec.h" | 46 | #include "mpegvideodec.h" |
| 48 | #include "msmpeg4dec.h" | 47 | #include "msmpeg4dec.h" |
| @@ -23,6 +23,11 @@ · 22 unmodified lines | |||
| 23 | #include "mpegvideo.h" | 23 | #include "mpegvideo.h" |
| 24 | #include "vlc.h" | 24 | #include "vlc.h" |
| 25 | 25 | ||
| 26 | /** | ||
| 27 | * Return value for header parsers if frame is not coded. | ||
| 28 | * */ | ||
| 29 | #define FRAME_SKIPPED 100 | ||
| 30 | |||
| 26 | // The defines below define the number of bits that are read at once for | 31 | // The defines below define the number of bits that are read at once for |
| 27 | // reading vlc values. Changing these may improve speed and data cache needs | 32 | // reading vlc values. Changing these may improve speed and data cache needs |
| 28 | // be aware though that decreasing them may need the number of stages that is | 33 | // be aware though that decreasing them may need the number of stages that is |
| @@ -19,12 +19,10 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "codec_internal.h" | 21 | #include "codec_internal.h" |
| 22 | #include "mpegutils.h" | ||
| 23 | #include "mpegvideo.h" | 22 | #include "mpegvideo.h" |
| 24 | #include "mpegvideodec.h" | 23 | #include "mpegvideodec.h" |
| 25 | #include "h263data.h" | 24 | #include "h263data.h" |
| 26 | #include "h263dec.h" | 25 | #include "h263dec.h" |
| 27 | #include "mpegvideodata.h" | ||
| 28 | 26 | ||
| 29 | /* don't understand why they choose a different header ! */ | 27 | /* don't understand why they choose a different header ! */ |
| 30 | int ff_intel_h263_decode_picture_header(MpegEncContext *s) | 28 | int ff_intel_h263_decode_picture_header(MpegEncContext *s) |
| @@ -26,7 +26,6 @@ · 25 unmodified lines | |||
| 26 | #include "libavutil/opt.h" | 26 | #include "libavutil/opt.h" |
| 27 | #include "libavutil/thread.h" | 27 | #include "libavutil/thread.h" |
| 28 | #include "codec_internal.h" | 28 | #include "codec_internal.h" |
| 29 | #include "mpegutils.h" | ||
| 30 | #include "mpegvideo.h" | 29 | #include "mpegvideo.h" |
| 31 | #include "h263.h" | 30 | #include "h263.h" |
| 32 | #include "h263enc.h" | 31 | #include "h263enc.h" |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | #include "avcodec.h" | 29 | #include "avcodec.h" |
| 30 | #include "motion_est.h" | 30 | #include "motion_est.h" |
| 31 | #include "mpegpicture.h" | 31 | #include "mpegpicture.h" |
| 32 | #include "mpegutils.h" | 32 | #include "mpegvideo.h" |
| 33 | #include "refstruct.h" | 33 | #include "refstruct.h" |
| 34 | #include "threadframe.h" | 34 | #include "threadframe.h" |
| 35 | 35 | ||
| @@ -27,11 +27,6 @@ · 26 unmodified lines | |||
| 27 | 27 | ||
| 28 | #include "avcodec.h" | 28 | #include "avcodec.h" |
| 29 | 29 | ||
| 30 | /** | ||
| 31 | * Return value for header parsers if frame is not coded. | ||
| 32 | * */ | ||
| 33 | #define FRAME_SKIPPED 100 | ||
| 34 | |||
| 35 | /* picture type */ | 30 | /* picture type */ |
| 36 | #define PICT_TOP_FIELD 1 | 31 | #define PICT_TOP_FIELD 1 |
| 37 | #define PICT_BOTTOM_FIELD 2 | 32 | #define PICT_BOTTOM_FIELD 2 |
| @@ -93,35 +88,6 @@ · 55 unmodified lines | |||
| 93 | 88 | ||
| 94 | #define HAS_CBP(a) ((a) & MB_TYPE_CBP) | 89 | #define HAS_CBP(a) ((a) & MB_TYPE_CBP) |
| 95 | 90 | ||
| 96 | /* MB types for encoding */ | ||
| 97 | #define CANDIDATE_MB_TYPE_INTRA (1 << 0) | ||
| 98 | #define CANDIDATE_MB_TYPE_INTER (1 << 1) | ||
| 99 | #define CANDIDATE_MB_TYPE_INTER4V (1 << 2) | ||
| 100 | #define CANDIDATE_MB_TYPE_SKIPPED (1 << 3) | ||
| 101 | |||
| 102 | #define CANDIDATE_MB_TYPE_DIRECT (1 << 4) | ||
| 103 | #define CANDIDATE_MB_TYPE_FORWARD (1 << 5) | ||
| 104 | #define CANDIDATE_MB_TYPE_BACKWARD (1 << 6) | ||
| 105 | #define CANDIDATE_MB_TYPE_BIDIR (1 << 7) | ||
| 106 | |||
| 107 | #define CANDIDATE_MB_TYPE_INTER_I (1 << 8) | ||
| 108 | #define CANDIDATE_MB_TYPE_FORWARD_I (1 << 9) | ||
| 109 | #define CANDIDATE_MB_TYPE_BACKWARD_I (1 << 10) | ||
| 110 | #define CANDIDATE_MB_TYPE_BIDIR_I (1 << 11) | ||
| 111 | |||
| 112 | #define CANDIDATE_MB_TYPE_DIRECT0 (1 << 12) | ||
| 113 | |||
| 114 | #define INPLACE_OFFSET 16 | ||
| 115 | |||
| 116 | enum OutputFormat { | ||
| 117 | FMT_MPEG1, | ||
| 118 | FMT_H261, | ||
| 119 | FMT_H263, | ||
| 120 | FMT_MJPEG, | ||
| 121 | FMT_SPEEDHQ, | ||
| 122 | }; | ||
| 123 | |||
| 124 | |||
| 125 | /** | 91 | /** |
| 126 | * Draw a horizontal band if supported. | 92 | * Draw a horizontal band if supported. |
| 127 | * | 93 | * |
| @@ -28,7 +28,6 @@ · 27 unmodified lines | |||
| 28 | #ifndef AVCODEC_MPEGVIDEO_H | 28 | #ifndef AVCODEC_MPEGVIDEO_H |
| 29 | #define AVCODEC_MPEGVIDEO_H | 29 | #define AVCODEC_MPEGVIDEO_H |
| 30 | 30 | ||
| 31 | #include "avcodec.h" | ||
| 32 | #include "blockdsp.h" | 31 | #include "blockdsp.h" |
| 33 | #include "error_resilience.h" | 32 | #include "error_resilience.h" |
| 34 | #include "fdctdsp.h" | 33 | #include "fdctdsp.h" |
| @@ -44,7 +43,6 @@ · 9 unmodified lines | |||
| 44 | #include "pixblockdsp.h" | 43 | #include "pixblockdsp.h" |
| 45 | #include "put_bits.h" | 44 | #include "put_bits.h" |
| 46 | #include "ratecontrol.h" | 45 | #include "ratecontrol.h" |
| 47 | #include "mpegutils.h" | ||
| 48 | #include "qpeldsp.h" | 46 | #include "qpeldsp.h" |
| 49 | #include "videodsp.h" | 47 | #include "videodsp.h" |
| 50 | 48 | ||
| @@ -61,6 +59,14 @@ typedef struct ScanTable { · 10 unmodified lines | |||
| 61 | uint8_t raster_end[64]; | 59 | uint8_t raster_end[64]; |
| 62 | } ScanTable; | 60 | } ScanTable; |
| 63 | 61 | ||
| 62 | enum OutputFormat { | ||
| 63 | FMT_MPEG1, | ||
| 64 | FMT_H261, | ||
| 65 | FMT_H263, | ||
| 66 | FMT_MJPEG, | ||
| 67 | FMT_SPEEDHQ, | ||
| 68 | }; | ||
| 69 | |||
| 64 | /** | 70 | /** |
| 65 | * MpegEncContext. | 71 | * MpegEncContext. |
| 66 | */ | 72 | */ |
| @@ -283,7 +289,7 @@ typedef struct MpegEncContext { · 216 unmodified lines | |||
| 283 | int mb_x, mb_y; | 289 | int mb_x, mb_y; |
| 284 | int mb_skip_run; | 290 | int mb_skip_run; |
| 285 | int mb_intra; | 291 | int mb_intra; |
| 286 | uint16_t *mb_type; ///< Table for candidate MB types for encoding (defines in mpegutils.h) | 292 | uint16_t *mb_type; ///< Table for candidate MB types for encoding (defines in mpegvideoenc.h) |
| 287 | 293 | ||
| 288 | int block_index[6]; ///< index to current MB in block based arrays with edges | 294 | int block_index[6]; ///< index to current MB in block based arrays with edges |
| 289 | int block_wrap[6]; | 295 | int block_wrap[6]; |
| @@ -34,6 +34,25 @@ · 33 unmodified lines | |||
| 34 | #include "mpegvideo.h" | 34 | #include "mpegvideo.h" |
| 35 | 35 | ||
| 36 | #define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level)) | 36 | #define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level)) |
| 37 | #define INPLACE_OFFSET 16 | ||
| 38 | |||
| 39 | /* MB types for encoding */ | ||
| 40 | #define CANDIDATE_MB_TYPE_INTRA (1 << 0) | ||
| 41 | #define CANDIDATE_MB_TYPE_INTER (1 << 1) | ||
| 42 | #define CANDIDATE_MB_TYPE_INTER4V (1 << 2) | ||
| 43 | #define CANDIDATE_MB_TYPE_SKIPPED (1 << 3) | ||
| 44 | |||
| 45 | #define CANDIDATE_MB_TYPE_DIRECT (1 << 4) | ||
| 46 | #define CANDIDATE_MB_TYPE_FORWARD (1 << 5) | ||
| 47 | #define CANDIDATE_MB_TYPE_BACKWARD (1 << 6) | ||
| 48 | #define CANDIDATE_MB_TYPE_BIDIR (1 << 7) | ||
| 49 | |||
| 50 | #define CANDIDATE_MB_TYPE_INTER_I (1 << 8) | ||
| 51 | #define CANDIDATE_MB_TYPE_FORWARD_I (1 << 9) | ||
| 52 | #define CANDIDATE_MB_TYPE_BACKWARD_I (1 << 10) | ||
| 53 | #define CANDIDATE_MB_TYPE_BIDIR_I (1 << 11) | ||
| 54 | |||
| 55 | #define CANDIDATE_MB_TYPE_DIRECT0 (1 << 12) | ||
| 37 | 56 | ||
| 38 | /* mpegvideo_enc common options */ | 57 | /* mpegvideo_enc common options */ |
| 39 | #define FF_MPV_FLAG_SKIP_RD 0x0001 | 58 | #define FF_MPV_FLAG_SKIP_RD 0x0001 |
| @@ -25,6 +25,7 @@ · 24 unmodified lines | |||
| 25 | #include "avcodec.h" | 25 | #include "avcodec.h" |
| 26 | #include "hwaccel_internal.h" | 26 | #include "hwaccel_internal.h" |
| 27 | #include "internal.h" | 27 | #include "internal.h" |
| 28 | #include "mpegutils.h" | ||
| 28 | #include "mpegvideo.h" | 29 | #include "mpegvideo.h" |
| 29 | #include "nvdec.h" | 30 | #include "nvdec.h" |
| 30 | #include "decode.h" | 31 | #include "decode.h" |
| @@ -32,7 +32,6 @@ · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #include "avcodec.h" | 33 | #include "avcodec.h" |
| 34 | #include "ratecontrol.h" | 34 | #include "ratecontrol.h" |
| 35 | #include "mpegutils.h" | ||
| 36 | #include "mpegvideoenc.h" | 35 | #include "mpegvideoenc.h" |
| 37 | #include "libavutil/eval.h" | 36 | #include "libavutil/eval.h" |
| 38 | 37 | ||
| @@ -38,7 +38,6 @@ · 37 unmodified lines | |||
| 38 | #include "h263data.h" | 38 | #include "h263data.h" |
| 39 | #include "h263dec.h" | 39 | #include "h263dec.h" |
| 40 | #include "mpeg_er.h" | 40 | #include "mpeg_er.h" |
| 41 | #include "mpegutils.h" | ||
| 42 | #include "mpegvideo.h" | 41 | #include "mpegvideo.h" |
| 43 | #include "mpegvideodec.h" | 42 | #include "mpegvideodec.h" |
| 44 | #include "mpeg4video.h" | 43 | #include "mpeg4video.h" |
| @@ -36,6 +36,7 @@ · 35 unmodified lines | |||
| 36 | #include "hwaccel_internal.h" | 36 | #include "hwaccel_internal.h" |
| 37 | #include "hwconfig.h" | 37 | #include "hwconfig.h" |
| 38 | #include "mpeg_er.h" | 38 | #include "mpeg_er.h" |
| 39 | #include "mpegutils.h" | ||
| 39 | #include "mpegvideo.h" | 40 | #include "mpegvideo.h" |
| 40 | #include "mpegvideodec.h" | 41 | #include "mpegvideodec.h" |
| 41 | #include "msmpeg4_vc1_data.h" | 42 | #include "msmpeg4_vc1_data.h" |