| @@ -27,6 +27,7 @@ · 26 unmodified lines |
| 27 | | 27 | |
| 28 | #include <stdint.h> | 28 | #include <stdint.h> |
| 29 | | 29 | |
| | 30 | #include "config.h" |
| 30 | #include "libavutil/attributes.h" | 31 | #include "libavutil/attributes.h" |
| 31 | #include "libavutil/avassert.h" | 32 | #include "libavutil/avassert.h" |
| 32 | #include "libavutil/log.h" | 33 | #include "libavutil/log.h" |
| @@ -44,6 +45,7 @@ · 11 unmodified lines |
| 44 | #include "mpegvideo.h" | 45 | #include "mpegvideo.h" |
| 45 | #include "profiles.h" | 46 | #include "profiles.h" |
| 46 | | 47 | |
| | 48 | #if CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER |
| 47 | static const uint8_t svcd_scan_offset_placeholder[] = { | 49 | static const uint8_t svcd_scan_offset_placeholder[] = { |
| 48 | 0x10, 0x0E, 0x00, 0x80, 0x81, 0x00, 0x80, | 50 | 0x10, 0x0E, 0x00, 0x80, 0x81, 0x00, 0x80, |
| 49 | 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 51 | 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
| @@ -64,8 +66,9 @@ static uint8_t mpeg1_index_run[2][64]; · 14 unmodified lines |
| 64 | static int8_t mpeg1_max_level[2][64]; | 66 | static int8_t mpeg1_max_level[2][64]; |
| 65 | | 67 | |
| 66 | #define A53_MAX_CC_COUNT 0x1f | 68 | #define A53_MAX_CC_COUNT 0x1f |
| | 69 | #endif /* CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER */ |
| 67 | | 70 | |
| 68 | static av_cold void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len) | 71 | av_cold void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len) |
| 69 | { | 72 | { |
| 70 | int i; | 73 | int i; |
| 71 | | 74 | |
| @@ -100,6 +103,7 @@ static av_cold void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len) · 28 unmodified lines |
| 100 | } | 103 | } |
| 101 | } | 104 | } |
| 102 | | 105 | |
| | 106 | #if CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER |
| 103 | static int find_frame_rate_index(MpegEncContext *s) | 107 | static int find_frame_rate_index(MpegEncContext *s) |
| 104 | { | 108 | { |
| 105 | int i; | 109 | int i; |
| @@ -1045,8 +1049,8 @@ static av_cold void mpeg12_encode_init_static(void) · 939 unmodified lines |
| 1045 | mpeg1_index_run[0][i] = ff_rl_mpeg1.index_run[0][i]; | 1049 | mpeg1_index_run[0][i] = ff_rl_mpeg1.index_run[0][i]; |
| 1046 | } | 1050 | } |
| 1047 | | 1051 | |
| 1048 | init_uni_ac_vlc(&ff_rl_mpeg1, uni_mpeg1_ac_vlc_len); | 1052 | ff_mpeg1_init_uni_ac_vlc(&ff_rl_mpeg1, uni_mpeg1_ac_vlc_len); |
| 1049 | init_uni_ac_vlc(&ff_rl_mpeg2, uni_mpeg2_ac_vlc_len); | 1053 | ff_mpeg1_init_uni_ac_vlc(&ff_rl_mpeg2, uni_mpeg2_ac_vlc_len); |
| 1050 | | 1054 | |
| 1051 | /* build unified dc encoding tables */ | 1055 | /* build unified dc encoding tables */ |
| 1052 | for (int i = -255; i < 256; i++) { | 1056 | for (int i = -255; i < 256; i++) { |
| @@ -1222,3 +1226,4 @@ AVCodec ff_mpeg2video_encoder = { · 169 unmodified lines |
| 1222 | .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, | 1226 | .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, |
| 1223 | .priv_class = &mpeg2_class, | 1227 | .priv_class = &mpeg2_class, |
| 1224 | }; | 1228 | }; |
| | 1229 | #endif /* CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER */ |