torchcodec 0.10.0__cp312-cp312-manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- torchcodec/__init__.py +27 -0
- torchcodec/_core/AVIOContextHolder.cpp +60 -0
- torchcodec/_core/AVIOContextHolder.h +64 -0
- torchcodec/_core/AVIOFileLikeContext.cpp +98 -0
- torchcodec/_core/AVIOFileLikeContext.h +55 -0
- torchcodec/_core/AVIOTensorContext.cpp +130 -0
- torchcodec/_core/AVIOTensorContext.h +44 -0
- torchcodec/_core/BetaCudaDeviceInterface.cpp +849 -0
- torchcodec/_core/BetaCudaDeviceInterface.h +196 -0
- torchcodec/_core/CMakeLists.txt +295 -0
- torchcodec/_core/CUDACommon.cpp +330 -0
- torchcodec/_core/CUDACommon.h +51 -0
- torchcodec/_core/Cache.h +124 -0
- torchcodec/_core/CpuDeviceInterface.cpp +509 -0
- torchcodec/_core/CpuDeviceInterface.h +141 -0
- torchcodec/_core/CudaDeviceInterface.cpp +602 -0
- torchcodec/_core/CudaDeviceInterface.h +79 -0
- torchcodec/_core/DeviceInterface.cpp +117 -0
- torchcodec/_core/DeviceInterface.h +191 -0
- torchcodec/_core/Encoder.cpp +1054 -0
- torchcodec/_core/Encoder.h +192 -0
- torchcodec/_core/FFMPEGCommon.cpp +684 -0
- torchcodec/_core/FFMPEGCommon.h +314 -0
- torchcodec/_core/FilterGraph.cpp +159 -0
- torchcodec/_core/FilterGraph.h +59 -0
- torchcodec/_core/Frame.cpp +47 -0
- torchcodec/_core/Frame.h +72 -0
- torchcodec/_core/Metadata.cpp +124 -0
- torchcodec/_core/Metadata.h +92 -0
- torchcodec/_core/NVCUVIDRuntimeLoader.cpp +320 -0
- torchcodec/_core/NVCUVIDRuntimeLoader.h +14 -0
- torchcodec/_core/NVDECCache.cpp +60 -0
- torchcodec/_core/NVDECCache.h +102 -0
- torchcodec/_core/SingleStreamDecoder.cpp +1586 -0
- torchcodec/_core/SingleStreamDecoder.h +391 -0
- torchcodec/_core/StreamOptions.h +70 -0
- torchcodec/_core/Transform.cpp +128 -0
- torchcodec/_core/Transform.h +86 -0
- torchcodec/_core/ValidationUtils.cpp +35 -0
- torchcodec/_core/ValidationUtils.h +21 -0
- torchcodec/_core/__init__.py +46 -0
- torchcodec/_core/_metadata.py +262 -0
- torchcodec/_core/custom_ops.cpp +1090 -0
- torchcodec/_core/fetch_and_expose_non_gpl_ffmpeg_libs.cmake +169 -0
- torchcodec/_core/nvcuvid_include/cuviddec.h +1374 -0
- torchcodec/_core/nvcuvid_include/nvcuvid.h +610 -0
- torchcodec/_core/ops.py +605 -0
- torchcodec/_core/pybind_ops.cpp +50 -0
- torchcodec/_frame.py +146 -0
- torchcodec/_internally_replaced_utils.py +68 -0
- torchcodec/_samplers/__init__.py +7 -0
- torchcodec/_samplers/video_clip_sampler.py +419 -0
- torchcodec/decoders/__init__.py +12 -0
- torchcodec/decoders/_audio_decoder.py +185 -0
- torchcodec/decoders/_decoder_utils.py +113 -0
- torchcodec/decoders/_video_decoder.py +601 -0
- torchcodec/encoders/__init__.py +2 -0
- torchcodec/encoders/_audio_encoder.py +149 -0
- torchcodec/encoders/_video_encoder.py +196 -0
- torchcodec/libtorchcodec_core4.so +0 -0
- torchcodec/libtorchcodec_core5.so +0 -0
- torchcodec/libtorchcodec_core6.so +0 -0
- torchcodec/libtorchcodec_core7.so +0 -0
- torchcodec/libtorchcodec_core8.so +0 -0
- torchcodec/libtorchcodec_custom_ops4.so +0 -0
- torchcodec/libtorchcodec_custom_ops5.so +0 -0
- torchcodec/libtorchcodec_custom_ops6.so +0 -0
- torchcodec/libtorchcodec_custom_ops7.so +0 -0
- torchcodec/libtorchcodec_custom_ops8.so +0 -0
- torchcodec/libtorchcodec_pybind_ops4.so +0 -0
- torchcodec/libtorchcodec_pybind_ops5.so +0 -0
- torchcodec/libtorchcodec_pybind_ops6.so +0 -0
- torchcodec/libtorchcodec_pybind_ops7.so +0 -0
- torchcodec/libtorchcodec_pybind_ops8.so +0 -0
- torchcodec/samplers/__init__.py +2 -0
- torchcodec/samplers/_common.py +84 -0
- torchcodec/samplers/_index_based.py +287 -0
- torchcodec/samplers/_time_based.py +358 -0
- torchcodec/share/cmake/TorchCodec/TorchCodecConfig.cmake +76 -0
- torchcodec/share/cmake/TorchCodec/ffmpeg_versions.cmake +122 -0
- torchcodec/transforms/__init__.py +12 -0
- torchcodec/transforms/_decoder_transforms.py +375 -0
- torchcodec/version.py +2 -0
- torchcodec-0.10.0.dist-info/METADATA +286 -0
- torchcodec-0.10.0.dist-info/RECORD +88 -0
- torchcodec-0.10.0.dist-info/WHEEL +5 -0
- torchcodec-0.10.0.dist-info/licenses/LICENSE +28 -0
- torchcodec-0.10.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# This file fetches the non-GPL ffmpeg libraries from the torchcodec S3 bucket,
|
|
2
|
+
# and exposes them as CMake targets so we can dynamically link against them.
|
|
3
|
+
# These libraries were built on the CI via the build_ffmpeg.yaml workflow.
|
|
4
|
+
|
|
5
|
+
# Avoid warning: see https://cmake.org/cmake/help/latest/policy/CMP0135.html
|
|
6
|
+
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
|
7
|
+
cmake_policy(SET CMP0135 NEW)
|
|
8
|
+
endif()
|
|
9
|
+
|
|
10
|
+
include(FetchContent)
|
|
11
|
+
|
|
12
|
+
set(
|
|
13
|
+
base_url
|
|
14
|
+
https://pytorch.s3.amazonaws.com/torchcodec/ffmpeg/2025-03-14
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if (LINUX)
|
|
18
|
+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64")
|
|
19
|
+
set(
|
|
20
|
+
platform_url
|
|
21
|
+
${base_url}/linux_aarch64
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
set(
|
|
25
|
+
f4_sha256
|
|
26
|
+
a310a2ed9ffe555fd3278dae15065541098dd35e124564671dcda6a6620ac842
|
|
27
|
+
)
|
|
28
|
+
set(
|
|
29
|
+
f5_sha256
|
|
30
|
+
89ca7996bccbc2db49adaa401d20fdbabffe0e1b4e07a0f81d6b143e858b7c8d
|
|
31
|
+
)
|
|
32
|
+
set(
|
|
33
|
+
f6_sha256
|
|
34
|
+
ae44c67b4587d061b8e9cc8990ca891ee013fe52ad79e5016ba29871562621da
|
|
35
|
+
)
|
|
36
|
+
set(
|
|
37
|
+
f7_sha256
|
|
38
|
+
948e2cac66ca6f68ff526d5e84138e94bce0f1a7c83f502d15d85d0bd3ddc112
|
|
39
|
+
)
|
|
40
|
+
set(
|
|
41
|
+
f8_sha256
|
|
42
|
+
b9cfd99ae75a14e58300854967d4dc49de0b3daa551df51ea1f52a3f08d2c8af
|
|
43
|
+
)
|
|
44
|
+
elseif (LINUX) # assume x86_64
|
|
45
|
+
set(
|
|
46
|
+
platform_url
|
|
47
|
+
${base_url}/linux_x86_64
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
set(
|
|
51
|
+
f4_sha256
|
|
52
|
+
1a083f1922443bedb5243d04896383b8c606778a7ddb9d886c8303e55339fe0c
|
|
53
|
+
)
|
|
54
|
+
set(
|
|
55
|
+
f5_sha256
|
|
56
|
+
65d6ad54082d94dcb3f801d73df2265e0e1bb303c7afbce7723e3b77ccd0e207
|
|
57
|
+
)
|
|
58
|
+
set(
|
|
59
|
+
f6_sha256
|
|
60
|
+
8bd5939c2f4a4b072e837e7870c13fe7d13824e5ff087ab534e4db4e90b7be9c
|
|
61
|
+
)
|
|
62
|
+
set(
|
|
63
|
+
f7_sha256
|
|
64
|
+
1cb946d8b7c6393c2c3ebe1f900b8de7a2885fe614c45d4ec32c9833084f2f26
|
|
65
|
+
)
|
|
66
|
+
set(
|
|
67
|
+
f8_sha256
|
|
68
|
+
c55b3c1a4b5e4d5fdd7c632bea3ab6f45b4e37cc8e0999dda3f84a8ed8defad8
|
|
69
|
+
)
|
|
70
|
+
endif()
|
|
71
|
+
elseif (APPLE)
|
|
72
|
+
set(
|
|
73
|
+
platform_url
|
|
74
|
+
${base_url}/macos_arm64
|
|
75
|
+
)
|
|
76
|
+
set(
|
|
77
|
+
f4_sha256
|
|
78
|
+
f0335434529d9e19359eae0fe912dd9e747667534a1c92e662f5219a55dfad8c
|
|
79
|
+
)
|
|
80
|
+
set(
|
|
81
|
+
f5_sha256
|
|
82
|
+
cfc3449c9af6863731a431ce89e32c08c5f8ece94b306fb6b695828502a76166
|
|
83
|
+
)
|
|
84
|
+
set(
|
|
85
|
+
f6_sha256
|
|
86
|
+
ec47b4783c342038e720e33b2fdfa55a9a490afb1cf37a26467733983688647e
|
|
87
|
+
)
|
|
88
|
+
set(
|
|
89
|
+
f7_sha256
|
|
90
|
+
48a4fc8ce098305cfd4a58f40889249c523ca3c285f66ba704b5bad0e3ada53a
|
|
91
|
+
)
|
|
92
|
+
set(
|
|
93
|
+
f8_sha256
|
|
94
|
+
beb936b76f25d2621228a12cdb67c9ae3d1eff7aa713ef8d1167ebf0c25bd5ec
|
|
95
|
+
)
|
|
96
|
+
elseif (WIN32)
|
|
97
|
+
set(
|
|
98
|
+
platform_url
|
|
99
|
+
${base_url}/windows_x86_64
|
|
100
|
+
)
|
|
101
|
+
set(
|
|
102
|
+
f4_sha256
|
|
103
|
+
270a1aa8892225267e68a7eb87c417931da30dccbf08ee2bde8833e659cab5cb
|
|
104
|
+
)
|
|
105
|
+
set(
|
|
106
|
+
f5_sha256
|
|
107
|
+
b8b2a349a847e56a6da875b066dff1cae53cb8ee7cf5ba9321ec1243dea0cde0
|
|
108
|
+
)
|
|
109
|
+
set(
|
|
110
|
+
f6_sha256
|
|
111
|
+
5d9f8c76dc55f790fa31d825985e9270bf9e498b8bfec21a0ad3a1feb1fa053a
|
|
112
|
+
)
|
|
113
|
+
set(
|
|
114
|
+
f7_sha256
|
|
115
|
+
ae391ace382330e912793b70b68529ee7c91026d2869b4df7e7c3e7d3656bdd5
|
|
116
|
+
)
|
|
117
|
+
set(
|
|
118
|
+
f8_sha256
|
|
119
|
+
bac845ac79876b104959cb0e7b9dec772a261116344dd17d2f97e7ddfac4a73f
|
|
120
|
+
)
|
|
121
|
+
else()
|
|
122
|
+
message(
|
|
123
|
+
FATAL_ERROR
|
|
124
|
+
"Unsupported operating system: ${CMAKE_SYSTEM_NAME}"
|
|
125
|
+
)
|
|
126
|
+
endif()
|
|
127
|
+
|
|
128
|
+
FetchContent_Declare(
|
|
129
|
+
f4
|
|
130
|
+
URL ${platform_url}/4.4.4.tar.gz
|
|
131
|
+
URL_HASH
|
|
132
|
+
SHA256=${f4_sha256}
|
|
133
|
+
)
|
|
134
|
+
FetchContent_Declare(
|
|
135
|
+
f5
|
|
136
|
+
URL ${platform_url}/5.1.4.tar.gz
|
|
137
|
+
URL_HASH
|
|
138
|
+
SHA256=${f5_sha256}
|
|
139
|
+
)
|
|
140
|
+
FetchContent_Declare(
|
|
141
|
+
f6
|
|
142
|
+
URL ${platform_url}/6.1.1.tar.gz
|
|
143
|
+
URL_HASH
|
|
144
|
+
SHA256=${f6_sha256}
|
|
145
|
+
)
|
|
146
|
+
FetchContent_Declare(
|
|
147
|
+
f7
|
|
148
|
+
URL ${platform_url}/7.0.1.tar.gz
|
|
149
|
+
URL_HASH
|
|
150
|
+
SHA256=${f7_sha256}
|
|
151
|
+
)
|
|
152
|
+
FetchContent_Declare(
|
|
153
|
+
f8
|
|
154
|
+
URL ${platform_url}/8.0.tar.gz
|
|
155
|
+
URL_HASH
|
|
156
|
+
SHA256=${f8_sha256}
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
FetchContent_MakeAvailable(f4 f5 f6 f7 f8)
|
|
160
|
+
|
|
161
|
+
# makes add_ffmpeg_target available
|
|
162
|
+
include("${CMAKE_CURRENT_SOURCE_DIR}/../share/cmake/TorchCodec/ffmpeg_versions.cmake")
|
|
163
|
+
|
|
164
|
+
# Note: the f?_SOURCE_DIR variables were set by FetchContent_MakeAvailable
|
|
165
|
+
add_ffmpeg_target(4 "${f4_SOURCE_DIR}")
|
|
166
|
+
add_ffmpeg_target(5 "${f5_SOURCE_DIR}")
|
|
167
|
+
add_ffmpeg_target(6 "${f6_SOURCE_DIR}")
|
|
168
|
+
add_ffmpeg_target(7 "${f7_SOURCE_DIR}")
|
|
169
|
+
add_ffmpeg_target(8 "${f8_SOURCE_DIR}")
|