|
2 | 2 |
|
3 | 3 | project ("ih264d")
|
4 | 4 |
|
5 |
| -set(LIBAVCDEC_X86_INCLUDES "common/x86" "decoder/x86") |
6 |
| - |
7 |
| -include_directories("common/" "decoder/" ${LIBAVCDEC_X86_INCLUDES}) |
8 |
| - |
9 | 5 | add_library (ih264d
|
10 | 6 | "common/ih264_buf_mgr.c"
|
11 | 7 | "common/ih264_buf_mgr.h"
|
@@ -53,21 +49,6 @@ add_library (ih264d
|
53 | 49 | "common/ih264_weighted_pred.h"
|
54 | 50 | "common/ithread.c"
|
55 | 51 | "common/ithread.h"
|
56 |
| -"common/x86/ih264_chroma_intra_pred_filters_ssse3.c" |
57 |
| -"common/x86/ih264_deblk_chroma_ssse3.c" |
58 |
| -"common/x86/ih264_deblk_luma_ssse3.c" |
59 |
| -"common/x86/ih264_ihadamard_scaling_sse42.c" |
60 |
| -"common/x86/ih264_ihadamard_scaling_ssse3.c" |
61 |
| -"common/x86/ih264_inter_pred_filters_ssse3.c" |
62 |
| -"common/x86/ih264_iquant_itrans_recon_dc_ssse3.c" |
63 |
| -"common/x86/ih264_iquant_itrans_recon_sse42.c" |
64 |
| -"common/x86/ih264_iquant_itrans_recon_ssse3.c" |
65 |
| -"common/x86/ih264_luma_intra_pred_filters_ssse3.c" |
66 |
| -"common/x86/ih264_mem_fns_ssse3.c" |
67 |
| -"common/x86/ih264_padding_ssse3.c" |
68 |
| -"common/x86/ih264_platform_macros.h" |
69 |
| -"common/x86/ih264_resi_trans_quant_sse42.c" |
70 |
| -"common/x86/ih264_weighted_pred_sse42.c" |
71 | 52 | "decoder/ih264d.h"
|
72 | 53 | "decoder/ih264d_api.c"
|
73 | 54 | "decoder/ih264d_bitstrm.c"
|
@@ -134,10 +115,71 @@ add_library (ih264d
|
134 | 115 | "decoder/ih264d_vui.h"
|
135 | 116 | "decoder/iv.h"
|
136 | 117 | "decoder/ivd.h"
|
| 118 | +) |
| 119 | + |
| 120 | +if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") |
| 121 | +set(LIBAVCDEC_X86_INCLUDES "common/x86" "decoder/x86") |
| 122 | +include_directories("common/" "decoder/" ${LIBAVCDEC_X86_INCLUDES}) |
| 123 | +target_sources(ih264d PRIVATE |
| 124 | +"common/x86/ih264_chroma_intra_pred_filters_ssse3.c" |
| 125 | +"common/x86/ih264_deblk_chroma_ssse3.c" |
| 126 | +"common/x86/ih264_deblk_luma_ssse3.c" |
| 127 | +"common/x86/ih264_ihadamard_scaling_sse42.c" |
| 128 | +"common/x86/ih264_ihadamard_scaling_ssse3.c" |
| 129 | +"common/x86/ih264_inter_pred_filters_ssse3.c" |
| 130 | +"common/x86/ih264_iquant_itrans_recon_dc_ssse3.c" |
| 131 | +"common/x86/ih264_iquant_itrans_recon_sse42.c" |
| 132 | +"common/x86/ih264_iquant_itrans_recon_ssse3.c" |
| 133 | +"common/x86/ih264_luma_intra_pred_filters_ssse3.c" |
| 134 | +"common/x86/ih264_mem_fns_ssse3.c" |
| 135 | +"common/x86/ih264_padding_ssse3.c" |
| 136 | +"common/x86/ih264_platform_macros.h" |
| 137 | +"common/x86/ih264_resi_trans_quant_sse42.c" |
| 138 | +"common/x86/ih264_weighted_pred_sse42.c" |
137 | 139 | "decoder/x86/ih264d_function_selector.c"
|
138 | 140 | "decoder/x86/ih264d_function_selector_sse42.c"
|
139 | 141 | "decoder/x86/ih264d_function_selector_ssse3.c"
|
140 | 142 | )
|
| 143 | +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") |
| 144 | +enable_language( C CXX ASM ) |
| 145 | +set(LIBAVCDEC_ARM_INCLUDES "common/armv8" "decoder/arm") |
| 146 | +include_directories("common/" "decoder/" ${LIBAVCDEC_ARM_INCLUDES}) |
| 147 | +target_sources(ih264d PRIVATE |
| 148 | +"common/armv8/ih264_deblk_chroma_av8.s" |
| 149 | +"common/armv8/ih264_deblk_luma_av8.s" |
| 150 | +"common/armv8/ih264_default_weighted_pred_av8.s" |
| 151 | +"common/armv8/ih264_ihadamard_scaling_av8.s" |
| 152 | +"common/armv8/ih264_inter_pred_chroma_av8.s" |
| 153 | +"common/armv8/ih264_inter_pred_filters_luma_horz_av8.s" |
| 154 | +"common/armv8/ih264_inter_pred_filters_luma_vert_av8.s" |
| 155 | +"common/armv8/ih264_inter_pred_luma_copy_av8.s" |
| 156 | +"common/armv8/ih264_inter_pred_luma_horz_hpel_vert_hpel_av8.s" |
| 157 | +"common/armv8/ih264_inter_pred_luma_horz_hpel_vert_qpel_av8.s" |
| 158 | +"common/armv8/ih264_inter_pred_luma_horz_qpel_av8.s" |
| 159 | +"common/armv8/ih264_inter_pred_luma_horz_qpel_vert_hpel_av8.s" |
| 160 | +"common/armv8/ih264_inter_pred_luma_horz_qpel_vert_qpel_av8.s" |
| 161 | +"common/armv8/ih264_inter_pred_luma_vert_qpel_av8.s" |
| 162 | +"common/armv8/ih264_intra_pred_chroma_av8.s" |
| 163 | +"common/armv8/ih264_intra_pred_luma_16x16_av8.s" |
| 164 | +"common/armv8/ih264_intra_pred_luma_4x4_av8.s" |
| 165 | +"common/armv8/ih264_intra_pred_luma_8x8_av8.s" |
| 166 | +"common/armv8/ih264_iquant_itrans_recon_av8.s" |
| 167 | +"common/armv8/ih264_iquant_itrans_recon_dc_av8.s" |
| 168 | +"common/armv8/ih264_mem_fns_neon_av8.s" |
| 169 | +"common/armv8/ih264_neon_macros.s" |
| 170 | +"common/armv8/ih264_padding_neon_av8.s" |
| 171 | +"common/armv8/ih264_platform_macros.h" |
| 172 | +"common/armv8/ih264_resi_trans_quant_av8.s" |
| 173 | +"common/armv8/ih264_weighted_bi_pred_av8.s" |
| 174 | +"common/armv8/ih264_weighted_pred_av8.s" |
| 175 | +"decoder/arm/ih264d_function_selector_a9q.c" |
| 176 | +"decoder/arm/ih264d_function_selector_av8.c" |
| 177 | +"decoder/arm/ih264d_function_selector.c" |
| 178 | +) |
| 179 | +target_compile_options(ih264d PRIVATE -DARMV8) |
| 180 | +else() |
| 181 | +message(FATAL_ERROR "ih264d unknown architecture: ${CMAKE_SYSTEM_PROCESSOR}") |
| 182 | +endif() |
141 | 183 |
|
142 | 184 | if(MSVC)
|
143 | 185 | set_property(TARGET ih264d PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
0 commit comments