From df35a3c27374374fa60e7cecc744c08c42388d3e Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Sun, 25 Jan 2026 23:28:57 +0100 Subject: [PATCH 1/7] feat: add xvidcore-1.3.7 Signed-off-by: 0verLighT --- releases.json | 8 + subprojects/packagefiles/xvidcore/meson.build | 199 ++++++++++++++++++ subprojects/xvidcore.wrap | 9 + 3 files changed, 216 insertions(+) create mode 100644 subprojects/packagefiles/xvidcore/meson.build create mode 100644 subprojects/xvidcore.wrap diff --git a/releases.json b/releases.json index 720632233..eebd84f66 100644 --- a/releases.json +++ b/releases.json @@ -4823,6 +4823,14 @@ "0.6.12-1" ] }, + "xvidcore": { + "dependency_names": [ + "xvidcore" + ], + "versions": [ + "1.3.7-1" + ] + }, "xxhash": { "dependency_names": [ "libxxhash" diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build new file mode 100644 index 000000000..2f9c726b0 --- /dev/null +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -0,0 +1,199 @@ +project( + 'xvidcore', + ['c', 'nasm'], + version: '1.3.7', + license: 'GPL-2.0-or-later', + meson_version: '>= 1.3.0', + default_options: ['warning_level=2', 'c_std=gnu99'], +) + +cc = meson.get_compiler('c') +m_dep = cc.find_library( + 'm', + required: true, +) +threads_deps = dependency( + 'threads', + required: false, +) +cpu_family = host_machine.cpu_family() +host_os = host_machine.system() +endian = host_machine.endian() +sources = [] +includes = [] +nasm_args = [] +c_args = [] + +if endian == 'big' + c_args += ['-DARCH_IS_BIG_ENDIAN'] +else + c_args += ['-DARCH_IS_LITTLE_ENDIAN'] +endif + +if cc.sizeof('void*') == 8 + c_args += ['-DARCH_IS_64BIT'] +else + c_args += ['-DARCH_IS_32BIT'] +endif + +if threads_deps.found() + c_args += ['-DHAVE_PTHREAD'] +endif + +if cpu_family == 'x86_64' + c_args += ['-DARCH_IS_X86_64'] + nasm_args += ['-DARCH_IS_X86_64'] +elif cpu_family == 'x86' + c_args += ['-DARCH_IS_X86'] + nasm_args += ['-DARCH_IS_X86'] +elif cpu_family == 'arm' or cpu_family == 'aarch64' + c_args += ['-DARCH_IS_ARM'] + nasm_args += ['-DARCH_IS_ARM'] +elif cpu_family == 'ppc' or cpu_family == 'ppc64' + c_args += ['-DARCH_IS_PPC'] + nasm_args += ['-DARCH_IS_PPC', '-maltivec', '-mabi=altivec'] +endif + +nasm_args += ['-DMARK_FUNCS'] +c_args += ['-ffast-math', '-fomit-frame-pointer', '-finline-functions', '-fPIC'] + +add_project_arguments( + c_args, + language: 'c', +) +add_project_arguments( + nasm_args, + language: 'nasm', +) + +sources += [ + files( + 'src/bitstream/bitstream.c', + 'src/bitstream/cbp.c', + 'src/bitstream/mbcoding.c', + 'src/dct/fdct.c', + 'src/dct/idct.c', + 'src/dct/simple_idct.c', + 'src/decoder.c', + 'src/encoder.c', + 'src/image/colorspace.c', + 'src/image/font.c', + 'src/image/image.c', + 'src/image/interpolate8x8.c', + 'src/image/postprocessing.c', + 'src/image/qpel.c', + 'src/image/reduced.c', + 'src/motion/estimation_bvop.c', + 'src/motion/estimation_common.c', + 'src/motion/estimation_gmc.c', + 'src/motion/estimation_pvop.c', + 'src/motion/estimation_rd_based.c', + 'src/motion/estimation_rd_based_bvop.c', + 'src/motion/gmc.c', + 'src/motion/motion_comp.c', + 'src/motion/sad.c', + 'src/motion/vop_type_decision.c', + 'src/plugins/plugin_2pass2.c', + 'src/plugins/plugin_dump.c', + 'src/plugins/plugin_lumimasking.c', + 'src/plugins/plugin_psnr.c', + 'src/plugins/plugin_psnrhvsm.c', + 'src/plugins/plugin_single.c', + 'src/plugins/plugin_ssim.c', + 'src/prediction/mbprediction.c', + 'src/quant/quant_h263.c', + 'src/quant/quant_matrix.c', + 'src/quant/quant_mpeg.c', + 'src/utils/emms.c', + 'src/utils/mbtransquant.c', + 'src/utils/mem_align.c', + 'src/utils/mem_transfer.c', + 'src/utils/timer.c', + 'src/xvid.c', + ), +] + +if cpu_family == 'ppc' or cpu_family == 'ppc64' + sources += [ + files( + 'src/dct/ppc_asm/idct_altivec.c', + 'src/image/ppc_asm/colorspace_altivec.c', + 'src/image/ppc_asm/interpolate8x8_altivec.c', + 'src/image/ppc_asm/qpel_altivec.c', + 'src/motion/ppc_asm/sad_altivec.c', + 'src/quant/ppc_asm/quant_h263_altivec.c', + 'src/quant/ppc_asm/quant_mpeg_altivec.c', + 'src/utils/ppc_asm/altivec_trigger.c', + 'src/utils/ppc_asm/mem_transfer_altivec.c', + ), + ] +elif cpu_family == 'x86' or cpu_family == 'x86_64' + includes += [include_directories('src/image/x86_asm')] + sources += [ + files( + 'src/bitstream/x86_asm/cbp_mmx.asm', + 'src/bitstream/x86_asm/cbp_sse2.asm', + 'src/dct/x86_asm/fdct_mmx_ffmpeg.asm', + 'src/dct/x86_asm/fdct_mmx_skal.asm', + 'src/dct/x86_asm/fdct_sse2_skal.asm', + 'src/dct/x86_asm/idct_3dne.asm', + 'src/dct/x86_asm/idct_mmx.asm', + 'src/dct/x86_asm/idct_sse2_dmitry.asm', + 'src/image/x86_asm/colorspace_rgb_mmx.asm', + 'src/image/x86_asm/colorspace_yuv_mmx.asm', + 'src/image/x86_asm/colorspace_yuyv_mmx.asm', + 'src/image/x86_asm/deintl_sse.asm', + 'src/image/x86_asm/gmc_mmx.asm', + 'src/image/x86_asm/interpolate8x8_3dn.asm', + 'src/image/x86_asm/interpolate8x8_3dne.asm', + 'src/image/x86_asm/interpolate8x8_mmx.asm', + 'src/image/x86_asm/interpolate8x8_xmm.asm', + 'src/image/x86_asm/postprocessing_mmx.asm', + 'src/image/x86_asm/postprocessing_sse2.asm', + 'src/image/x86_asm/qpel_mmx.asm', + 'src/image/x86_asm/reduced_mmx.asm', + 'src/motion/x86_asm/sad_3dn.asm', + 'src/motion/x86_asm/sad_3dne.asm', + 'src/motion/x86_asm/sad_mmx.asm', + 'src/motion/x86_asm/sad_sse2.asm', + 'src/motion/x86_asm/sad_xmm.asm', + 'src/plugins/plugin_2pass1.c', + 'src/plugins/x86_asm/plugin_ssim-a.asm', + 'src/quant/x86_asm/quantize_h263_3dne.asm', + 'src/quant/x86_asm/quantize_h263_mmx.asm', + 'src/quant/x86_asm/quantize_mpeg_mmx.asm', + 'src/quant/x86_asm/quantize_mpeg_xmm.asm', + 'src/utils/x86_asm/cpuid.asm', + 'src/utils/x86_asm/interlacing_mmx.asm', + 'src/utils/x86_asm/mem_transfer_3dne.asm', + 'src/utils/x86_asm/mem_transfer_mmx.asm', + ), + ] +endif + +includes += [ + include_directories('src'), + include_directories('src/bitstream'), + include_directories('src/dct'), + include_directories('src/image'), + include_directories('src/motion'), + include_directories('src/plugins'), + include_directories('src/prediction'), + include_directories('src/quant'), + include_directories('src/utils'), +] + +xvidcore = both_libraries( + 'xvidcore', + sources, + install: true, + dependencies: [m_dep, threads_deps], + include_directories: includes, +) + +xvidcore_deps = declare_dependency( + include_directories: includes, + link_with: xvidcore, +) +meson.override_dependency('xvidcore', xvidcore_deps) + diff --git a/subprojects/xvidcore.wrap b/subprojects/xvidcore.wrap new file mode 100644 index 000000000..6bfb1930a --- /dev/null +++ b/subprojects/xvidcore.wrap @@ -0,0 +1,9 @@ +[wrap-file] +directory = xvidcore +source_url = https://downloads.xvid.com/downloads/xvidcore-1.3.7.tar.gz +source_filename = xvidcore-1.3.7.tar.gz +source_hash = abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d +patch_directory = xvidcore + +[provide] +dependency_names = xvidcore From e890a1bdb95177aa7e9115a2347395d88c9d09f5 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Mon, 26 Jan 2026 04:54:27 +0100 Subject: [PATCH 2/7] ci: add nasm Signed-off-by: 0verLighT --- ci_config.json | 17 +++ subprojects/packagefiles/xvidcore/meson.build | 134 +++++++++++++++--- 2 files changed, 130 insertions(+), 21 deletions(-) diff --git a/ci_config.json b/ci_config.json index 6e242fcce..48dad0916 100644 --- a/ci_config.json +++ b/ci_config.json @@ -1605,6 +1605,23 @@ "liblzma-dev" ] }, + "xvidcore" : { + "alpine_packages": [ + "nasm" + ], + "brew_packages": [ + "nasm" + ], + "debian_packages": [ + "nasm" + ], + "choco_packages": [ + "nasm" + ], + "msys_packages": [ + "nasm" + ] + }, "yaml-cpp": { "build_options": [ "yaml-cpp:tests=enabled" diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index 2f9c726b0..5f175fbfd 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -1,16 +1,16 @@ project( 'xvidcore', - ['c', 'nasm'], + 'c', version: '1.3.7', license: 'GPL-2.0-or-later', meson_version: '>= 1.3.0', - default_options: ['warning_level=2', 'c_std=gnu99'], + default_options: ['warning_level=2', 'c_std=gnu99,c99'], ) cc = meson.get_compiler('c') m_dep = cc.find_library( 'm', - required: true, + required: false, ) threads_deps = dependency( 'threads', @@ -23,6 +23,14 @@ sources = [] includes = [] nasm_args = [] c_args = [] +link_args = [] + +if cpu_family == 'x86' or cpu_family == 'x86_64' + add_languages( + 'nasm', + native: false, + ) +endif if endian == 'big' c_args += ['-DARCH_IS_BIG_ENDIAN'] @@ -36,35 +44,100 @@ else c_args += ['-DARCH_IS_32BIT'] endif -if threads_deps.found() +if cc.has_header('stdint.h') + c_args += ['-DHAVE_STDINT_H'] +endif + +if cc.has_header('inttypes.h') + c_args += ['-DHAVE_INTTYPES_H'] +endif + +if threads_deps.found() and cc.has_header('pthread.h') c_args += ['-DHAVE_PTHREAD'] endif if cpu_family == 'x86_64' c_args += ['-DARCH_IS_X86_64'] nasm_args += ['-DARCH_IS_X86_64'] + add_project_arguments( + nasm_args, + language: 'nasm', + ) elif cpu_family == 'x86' - c_args += ['-DARCH_IS_X86'] - nasm_args += ['-DARCH_IS_X86'] -elif cpu_family == 'arm' or cpu_family == 'aarch64' - c_args += ['-DARCH_IS_ARM'] - nasm_args += ['-DARCH_IS_ARM'] -elif cpu_family == 'ppc' or cpu_family == 'ppc64' - c_args += ['-DARCH_IS_PPC'] - nasm_args += ['-DARCH_IS_PPC', '-maltivec', '-mabi=altivec'] + c_args += ['-DARCH_IS_IA32'] + nasm_args += ['-DARCH_IS_IA32'] + add_project_arguments( + nasm_args, + language: 'nasm', + ) +elif (cpu_family == 'ppc' or cpu_family == 'ppc64') and endian == 'big' + c_args += ['-DARCH_IS_PPC', '-maltivec', '-mabi=altivec'] +else + c_args += ['-DARCH_IS_GENERIC'] endif -nasm_args += ['-DMARK_FUNCS'] -c_args += ['-ffast-math', '-fomit-frame-pointer', '-finline-functions', '-fPIC'] +if host_os == 'darwin' or (host_os == 'windows' and cpu_family == 'x86') + nasm_args += ['-DPREFIX'] + + if host_os == 'linux' + nasm_args += ['-DMARK_FUNCS'] + endif + + if (cpu_family == 'x86' or cpu_family == 'x86_64') + add_project_arguments( + nasm_args, + language: 'nasm', + ) + endif + +endif +if host_os == 'windows' + c_args += [ + '-DWIN32', + '-DHAVE_STDINT_H', + '-DHAVE_INTTYPES_H', + '-DHAVE_SYS_TYPES_H', + ] + if cc.get_argument_syntax() == 'msvc' + c_args += [ + '/FIstdint.h', + '-D_try=__try', + '-D_except=__except', + '/EHa', + '/wd4996', + ] + exports = [ + '/EXPORT:xvid_global', + '/EXPORT:xvid_decore', + '/EXPORT:xvid_encore', + '/EXPORT:xvid_plugin_single', + '/EXPORT:xvid_plugin_2pass1', + '/EXPORT:xvid_plugin_2pass2', + '/EXPORT:xvid_plugin_lumimasking', + '/EXPORT:xvid_plugin_dump', + '/EXPORT:xvid_plugin_psnr', + '/EXPORT:xvid_plugin_psnrhvsm', + '/EXPORT:xvid_plugin_ssim', + ] + link_args += exports + endif +endif + +if cc.get_argument_syntax() == 'msvc' + c_args += ['/wd4996'] +else + c_args += [ + '-ffast-math', + '-fomit-frame-pointer', + '-finline-functions', + '-fPIC', + ] +endif add_project_arguments( c_args, language: 'c', ) -add_project_arguments( - nasm_args, - language: 'nasm', -) sources += [ files( @@ -89,10 +162,10 @@ sources += [ 'src/motion/estimation_pvop.c', 'src/motion/estimation_rd_based.c', 'src/motion/estimation_rd_based_bvop.c', - 'src/motion/gmc.c', 'src/motion/motion_comp.c', 'src/motion/sad.c', 'src/motion/vop_type_decision.c', + 'src/plugins/plugin_2pass1.c', 'src/plugins/plugin_2pass2.c', 'src/plugins/plugin_dump.c', 'src/plugins/plugin_lumimasking.c', @@ -113,7 +186,7 @@ sources += [ ), ] -if cpu_family == 'ppc' or cpu_family == 'ppc64' +if (cpu_family == 'ppc' or cpu_family == 'ppc64') and endian == 'big' sources += [ files( 'src/dct/ppc_asm/idct_altivec.c', @@ -157,7 +230,6 @@ elif cpu_family == 'x86' or cpu_family == 'x86_64' 'src/motion/x86_asm/sad_mmx.asm', 'src/motion/x86_asm/sad_sse2.asm', 'src/motion/x86_asm/sad_xmm.asm', - 'src/plugins/plugin_2pass1.c', 'src/plugins/x86_asm/plugin_ssim-a.asm', 'src/quant/x86_asm/quantize_h263_3dne.asm', 'src/quant/x86_asm/quantize_h263_mmx.asm', @@ -183,12 +255,32 @@ includes += [ include_directories('src/utils'), ] +if cpu_family == 'aarch64' and cc.get_id() == 'msvc' + prog_python = import('python').find_installation() + gmc_patched = custom_target( + 'gmc_patched', + input: 'src/motion/gmc.c', + output: 'gmc_patched.c', + command: [ + prog_python, + '-c', + 'import sys; open(sys.argv[2], "w", encoding="utf-8").write(open(sys.argv[1], "r", encoding="utf-8").read().replace("defined(_MSC_VER)", "0"))', + '@INPUT@', + '@OUTPUT@', + ], + ) + sources += [gmc_patched] +else + sources += files('src/motion/gmc.c') +endif + xvidcore = both_libraries( 'xvidcore', sources, install: true, dependencies: [m_dep, threads_deps], include_directories: includes, + link_args: link_args, ) xvidcore_deps = declare_dependency( From c5a84abc51c0658462979d4feaebbfe7f2bd0f3e Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Fri, 30 Jan 2026 00:32:47 +0100 Subject: [PATCH 3/7] chore: add pkg-config xvidcore and add libxvidcore.def Signed-off-by: 0verLighT --- subprojects/packagefiles/xvidcore/meson.build | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index 5f175fbfd..0c1116e0c 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -23,7 +23,6 @@ sources = [] includes = [] nasm_args = [] c_args = [] -link_args = [] if cpu_family == 'x86' or cpu_family == 'x86_64' add_languages( @@ -104,22 +103,8 @@ if host_os == 'windows' '-D_try=__try', '-D_except=__except', '/EHa', - '/wd4996', ] - exports = [ - '/EXPORT:xvid_global', - '/EXPORT:xvid_decore', - '/EXPORT:xvid_encore', - '/EXPORT:xvid_plugin_single', - '/EXPORT:xvid_plugin_2pass1', - '/EXPORT:xvid_plugin_2pass2', - '/EXPORT:xvid_plugin_lumimasking', - '/EXPORT:xvid_plugin_dump', - '/EXPORT:xvid_plugin_psnr', - '/EXPORT:xvid_plugin_psnrhvsm', - '/EXPORT:xvid_plugin_ssim', - ] - link_args += exports + sources += files('build/generic/libxvidcore.def') endif endif @@ -280,7 +265,6 @@ xvidcore = both_libraries( install: true, dependencies: [m_dep, threads_deps], include_directories: includes, - link_args: link_args, ) xvidcore_deps = declare_dependency( @@ -289,3 +273,7 @@ xvidcore_deps = declare_dependency( ) meson.override_dependency('xvidcore', xvidcore_deps) +pkg = import('pkgconfig') + +pkg.generate(xvidcore) + From 9e85aa5c83eb47826814892087b21d6dc31289d1 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Fri, 30 Jan 2026 03:03:20 +0100 Subject: [PATCH 4/7] chore: post-review fixes Signed-off-by: 0verLighT --- subprojects/packagefiles/xvidcore/meson.build | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index 0c1116e0c..e94663cac 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -12,7 +12,7 @@ m_dep = cc.find_library( 'm', required: false, ) -threads_deps = dependency( +thread_dep = dependency( 'threads', required: false, ) @@ -51,7 +51,10 @@ if cc.has_header('inttypes.h') c_args += ['-DHAVE_INTTYPES_H'] endif -if threads_deps.found() and cc.has_header('pthread.h') +if cc.has_header( + 'pthread.h', + dependencies: thread_dep, +) c_args += ['-DHAVE_PTHREAD'] endif @@ -104,7 +107,6 @@ if host_os == 'windows' '-D_except=__except', '/EHa', ] - sources += files('build/generic/libxvidcore.def') endif endif @@ -263,17 +265,18 @@ xvidcore = both_libraries( 'xvidcore', sources, install: true, - dependencies: [m_dep, threads_deps], + dependencies: [m_dep, thread_dep], include_directories: includes, + vs_module_defs: 'build/generic/libxvidcore.def', ) -xvidcore_deps = declare_dependency( - include_directories: includes, - link_with: xvidcore, -) -meson.override_dependency('xvidcore', xvidcore_deps) - pkg = import('pkgconfig') pkg.generate(xvidcore) +xvidcore_dep = declare_dependency( + include_directories: includes, + link_with: xvidcore, +) +meson.override_dependency('xvidcore', xvidcore_dep) + From 1f4f1cfd46c5705d99a2b784ddc122b120bd4ea4 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Fri, 30 Jan 2026 16:27:12 +0100 Subject: [PATCH 5/7] chore: remove useless [] Signed-off-by: 0verLighT --- subprojects/packagefiles/xvidcore/meson.build | 202 ++++++++---------- 1 file changed, 93 insertions(+), 109 deletions(-) diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index e94663cac..4bb150952 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -106,128 +106,112 @@ if host_os == 'windows' '-D_try=__try', '-D_except=__except', '/EHa', + '/wd4996', ] endif endif -if cc.get_argument_syntax() == 'msvc' - c_args += ['/wd4996'] -else - c_args += [ - '-ffast-math', - '-fomit-frame-pointer', - '-finline-functions', - '-fPIC', - ] -endif - add_project_arguments( c_args, language: 'c', ) -sources += [ - files( - 'src/bitstream/bitstream.c', - 'src/bitstream/cbp.c', - 'src/bitstream/mbcoding.c', - 'src/dct/fdct.c', - 'src/dct/idct.c', - 'src/dct/simple_idct.c', - 'src/decoder.c', - 'src/encoder.c', - 'src/image/colorspace.c', - 'src/image/font.c', - 'src/image/image.c', - 'src/image/interpolate8x8.c', - 'src/image/postprocessing.c', - 'src/image/qpel.c', - 'src/image/reduced.c', - 'src/motion/estimation_bvop.c', - 'src/motion/estimation_common.c', - 'src/motion/estimation_gmc.c', - 'src/motion/estimation_pvop.c', - 'src/motion/estimation_rd_based.c', - 'src/motion/estimation_rd_based_bvop.c', - 'src/motion/motion_comp.c', - 'src/motion/sad.c', - 'src/motion/vop_type_decision.c', - 'src/plugins/plugin_2pass1.c', - 'src/plugins/plugin_2pass2.c', - 'src/plugins/plugin_dump.c', - 'src/plugins/plugin_lumimasking.c', - 'src/plugins/plugin_psnr.c', - 'src/plugins/plugin_psnrhvsm.c', - 'src/plugins/plugin_single.c', - 'src/plugins/plugin_ssim.c', - 'src/prediction/mbprediction.c', - 'src/quant/quant_h263.c', - 'src/quant/quant_matrix.c', - 'src/quant/quant_mpeg.c', - 'src/utils/emms.c', - 'src/utils/mbtransquant.c', - 'src/utils/mem_align.c', - 'src/utils/mem_transfer.c', - 'src/utils/timer.c', - 'src/xvid.c', - ), -] +sources += files( + 'src/bitstream/bitstream.c', + 'src/bitstream/cbp.c', + 'src/bitstream/mbcoding.c', + 'src/dct/fdct.c', + 'src/dct/idct.c', + 'src/dct/simple_idct.c', + 'src/decoder.c', + 'src/encoder.c', + 'src/image/colorspace.c', + 'src/image/font.c', + 'src/image/image.c', + 'src/image/interpolate8x8.c', + 'src/image/postprocessing.c', + 'src/image/qpel.c', + 'src/image/reduced.c', + 'src/motion/estimation_bvop.c', + 'src/motion/estimation_common.c', + 'src/motion/estimation_gmc.c', + 'src/motion/estimation_pvop.c', + 'src/motion/estimation_rd_based.c', + 'src/motion/estimation_rd_based_bvop.c', + 'src/motion/motion_comp.c', + 'src/motion/sad.c', + 'src/motion/vop_type_decision.c', + 'src/plugins/plugin_2pass1.c', + 'src/plugins/plugin_2pass2.c', + 'src/plugins/plugin_dump.c', + 'src/plugins/plugin_lumimasking.c', + 'src/plugins/plugin_psnr.c', + 'src/plugins/plugin_psnrhvsm.c', + 'src/plugins/plugin_single.c', + 'src/plugins/plugin_ssim.c', + 'src/prediction/mbprediction.c', + 'src/quant/quant_h263.c', + 'src/quant/quant_matrix.c', + 'src/quant/quant_mpeg.c', + 'src/utils/emms.c', + 'src/utils/mbtransquant.c', + 'src/utils/mem_align.c', + 'src/utils/mem_transfer.c', + 'src/utils/timer.c', + 'src/xvid.c', +) if (cpu_family == 'ppc' or cpu_family == 'ppc64') and endian == 'big' - sources += [ - files( - 'src/dct/ppc_asm/idct_altivec.c', - 'src/image/ppc_asm/colorspace_altivec.c', - 'src/image/ppc_asm/interpolate8x8_altivec.c', - 'src/image/ppc_asm/qpel_altivec.c', - 'src/motion/ppc_asm/sad_altivec.c', - 'src/quant/ppc_asm/quant_h263_altivec.c', - 'src/quant/ppc_asm/quant_mpeg_altivec.c', - 'src/utils/ppc_asm/altivec_trigger.c', - 'src/utils/ppc_asm/mem_transfer_altivec.c', - ), - ] + sources += files( + 'src/dct/ppc_asm/idct_altivec.c', + 'src/image/ppc_asm/colorspace_altivec.c', + 'src/image/ppc_asm/interpolate8x8_altivec.c', + 'src/image/ppc_asm/qpel_altivec.c', + 'src/motion/ppc_asm/sad_altivec.c', + 'src/quant/ppc_asm/quant_h263_altivec.c', + 'src/quant/ppc_asm/quant_mpeg_altivec.c', + 'src/utils/ppc_asm/altivec_trigger.c', + 'src/utils/ppc_asm/mem_transfer_altivec.c', + ) elif cpu_family == 'x86' or cpu_family == 'x86_64' includes += [include_directories('src/image/x86_asm')] - sources += [ - files( - 'src/bitstream/x86_asm/cbp_mmx.asm', - 'src/bitstream/x86_asm/cbp_sse2.asm', - 'src/dct/x86_asm/fdct_mmx_ffmpeg.asm', - 'src/dct/x86_asm/fdct_mmx_skal.asm', - 'src/dct/x86_asm/fdct_sse2_skal.asm', - 'src/dct/x86_asm/idct_3dne.asm', - 'src/dct/x86_asm/idct_mmx.asm', - 'src/dct/x86_asm/idct_sse2_dmitry.asm', - 'src/image/x86_asm/colorspace_rgb_mmx.asm', - 'src/image/x86_asm/colorspace_yuv_mmx.asm', - 'src/image/x86_asm/colorspace_yuyv_mmx.asm', - 'src/image/x86_asm/deintl_sse.asm', - 'src/image/x86_asm/gmc_mmx.asm', - 'src/image/x86_asm/interpolate8x8_3dn.asm', - 'src/image/x86_asm/interpolate8x8_3dne.asm', - 'src/image/x86_asm/interpolate8x8_mmx.asm', - 'src/image/x86_asm/interpolate8x8_xmm.asm', - 'src/image/x86_asm/postprocessing_mmx.asm', - 'src/image/x86_asm/postprocessing_sse2.asm', - 'src/image/x86_asm/qpel_mmx.asm', - 'src/image/x86_asm/reduced_mmx.asm', - 'src/motion/x86_asm/sad_3dn.asm', - 'src/motion/x86_asm/sad_3dne.asm', - 'src/motion/x86_asm/sad_mmx.asm', - 'src/motion/x86_asm/sad_sse2.asm', - 'src/motion/x86_asm/sad_xmm.asm', - 'src/plugins/x86_asm/plugin_ssim-a.asm', - 'src/quant/x86_asm/quantize_h263_3dne.asm', - 'src/quant/x86_asm/quantize_h263_mmx.asm', - 'src/quant/x86_asm/quantize_mpeg_mmx.asm', - 'src/quant/x86_asm/quantize_mpeg_xmm.asm', - 'src/utils/x86_asm/cpuid.asm', - 'src/utils/x86_asm/interlacing_mmx.asm', - 'src/utils/x86_asm/mem_transfer_3dne.asm', - 'src/utils/x86_asm/mem_transfer_mmx.asm', - ), - ] + sources += files( + 'src/bitstream/x86_asm/cbp_mmx.asm', + 'src/bitstream/x86_asm/cbp_sse2.asm', + 'src/dct/x86_asm/fdct_mmx_ffmpeg.asm', + 'src/dct/x86_asm/fdct_mmx_skal.asm', + 'src/dct/x86_asm/fdct_sse2_skal.asm', + 'src/dct/x86_asm/idct_3dne.asm', + 'src/dct/x86_asm/idct_mmx.asm', + 'src/dct/x86_asm/idct_sse2_dmitry.asm', + 'src/image/x86_asm/colorspace_rgb_mmx.asm', + 'src/image/x86_asm/colorspace_yuv_mmx.asm', + 'src/image/x86_asm/colorspace_yuyv_mmx.asm', + 'src/image/x86_asm/deintl_sse.asm', + 'src/image/x86_asm/gmc_mmx.asm', + 'src/image/x86_asm/interpolate8x8_3dn.asm', + 'src/image/x86_asm/interpolate8x8_3dne.asm', + 'src/image/x86_asm/interpolate8x8_mmx.asm', + 'src/image/x86_asm/interpolate8x8_xmm.asm', + 'src/image/x86_asm/postprocessing_mmx.asm', + 'src/image/x86_asm/postprocessing_sse2.asm', + 'src/image/x86_asm/qpel_mmx.asm', + 'src/image/x86_asm/reduced_mmx.asm', + 'src/motion/x86_asm/sad_3dn.asm', + 'src/motion/x86_asm/sad_3dne.asm', + 'src/motion/x86_asm/sad_mmx.asm', + 'src/motion/x86_asm/sad_sse2.asm', + 'src/motion/x86_asm/sad_xmm.asm', + 'src/plugins/x86_asm/plugin_ssim-a.asm', + 'src/quant/x86_asm/quantize_h263_3dne.asm', + 'src/quant/x86_asm/quantize_h263_mmx.asm', + 'src/quant/x86_asm/quantize_mpeg_mmx.asm', + 'src/quant/x86_asm/quantize_mpeg_xmm.asm', + 'src/utils/x86_asm/cpuid.asm', + 'src/utils/x86_asm/interlacing_mmx.asm', + 'src/utils/x86_asm/mem_transfer_3dne.asm', + 'src/utils/x86_asm/mem_transfer_mmx.asm', + ) endif includes += [ From b5eeb344bf50aef5af873c00269cbeeeca2cc3c8 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Sun, 1 Feb 2026 01:13:37 +0100 Subject: [PATCH 6/7] chore: replace both_libraries to library Signed-off-by: 0verLighT --- subprojects/packagefiles/xvidcore/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index 4bb150952..ac22d819e 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -245,7 +245,7 @@ else sources += files('src/motion/gmc.c') endif -xvidcore = both_libraries( +xvidcore = library( 'xvidcore', sources, install: true, From b4502982e1674e1578a8022311fbeac945b7a0e2 Mon Sep 17 00:00:00 2001 From: 0verLighT Date: Sat, 14 Feb 2026 23:12:26 +0100 Subject: [PATCH 7/7] chore: install header xvid.h Signed-off-by: 0verLighT --- subprojects/packagefiles/xvidcore/meson.build | 3 +++ subprojects/packagefiles/xvidcore/src/meson.build | 1 + 2 files changed, 4 insertions(+) create mode 100644 subprojects/packagefiles/xvidcore/src/meson.build diff --git a/subprojects/packagefiles/xvidcore/meson.build b/subprojects/packagefiles/xvidcore/meson.build index ac22d819e..05eeeb807 100644 --- a/subprojects/packagefiles/xvidcore/meson.build +++ b/subprojects/packagefiles/xvidcore/meson.build @@ -245,6 +245,9 @@ else sources += files('src/motion/gmc.c') endif +# Install header 'xvid.h' +subdir('src') + xvidcore = library( 'xvidcore', sources, diff --git a/subprojects/packagefiles/xvidcore/src/meson.build b/subprojects/packagefiles/xvidcore/src/meson.build new file mode 100644 index 000000000..c614967ea --- /dev/null +++ b/subprojects/packagefiles/xvidcore/src/meson.build @@ -0,0 +1 @@ +install_headers('xvid.h')