Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AV1 support #5504

Merged
merged 59 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e2ecee6
Add video plugin
jantonguirao Dec 18, 2023
582eaa6
Use VideoCodecSDK from NGC link
jantonguirao Feb 8, 2024
adf1843
Rearrange video plugin operators to use VideoCodecSDK dlopened cuvid …
jantonguirao Feb 19, 2024
739ce7b
Add dynlink_nvcuvid
jantonguirao Mar 4, 2024
7683718
New decoder draft
jantonguirao Mar 1, 2024
3d643d8
Remove legacy ops
jantonguirao Mar 4, 2024
7249161
Fix
jantonguirao Mar 4, 2024
b8bfd24
Remove ffmpeg find code
jantonguirao Mar 4, 2024
e350ece
Remove CUDA from the name of the plugin
jantonguirao Mar 5, 2024
2eae25a
Fix plugin installation
jantonguirao Mar 6, 2024
76575b8
Rearrange plugin
jantonguirao Mar 7, 2024
604553d
Remove placeholder __init__ file
jantonguirao Mar 7, 2024
0997110
Deliver python stubs
jantonguirao Mar 7, 2024
cb4476d
Plugin autodiscovery
jantonguirao Mar 8, 2024
6c50533
Fix ffmpeg build
jantonguirao Mar 11, 2024
258afe7
Plugin preload
jantonguirao Mar 12, 2024
14fd16a
BUILD_FFMPEG option
jantonguirao Mar 13, 2024
4b198e2
Use ENV variables for source tarballs
jantonguirao Mar 13, 2024
6447dd1
Fix compile flags
jantonguirao Mar 15, 2024
67487ff
Code review fixes
jantonguirao Mar 15, 2024
ef82efe
more review fixes
jantonguirao Mar 15, 2024
01da4ba
Update docker
jantonguirao Mar 25, 2024
3975798
Lint
jantonguirao Mar 25, 2024
f2d96da
Cleanup
jantonguirao Apr 29, 2024
8950adf
add qa test about video plugin installation
jantonguirao Apr 29, 2024
472660a
Lint fix
jantonguirao Apr 29, 2024
4f481d9
copy all sdist tar.gz artifacts to runner docker
jantonguirao Apr 30, 2024
cd8375b
Add pip dependencies to video_plugin test
jantonguirao Apr 30, 2024
a3ed3b0
Fix ffmpeg dependency
jantonguirao Apr 30, 2024
c9194c9
Use PyNvVideoCodec 1.0.2
jantonguirao May 2, 2024
249f13a
Undo unnecessary deps
jantonguirao May 2, 2024
ed8cef4
Document plugin, rename to plugin.video.decoder
jantonguirao May 3, 2024
018b747
Remove prints
jantonguirao May 6, 2024
9892cf6
Remove Python 3.13 from setup.py
jantonguirao May 7, 2024
da2e777
Preload libcuda stub
jantonguirao May 7, 2024
4aa9a90
Undo doc change from this PR
jantonguirao May 10, 2024
502f11b
Add linting
jantonguirao May 20, 2024
dea2133
Basic test working
awolant May 20, 2024
f89c04b
Merge remote-tracking branch 'nvidia/main' into video_decoder_plugin
awolant May 21, 2024
8bbff16
Invoke tests
awolant May 21, 2024
c69c5a6
Add end_frame
awolant May 21, 2024
44aba05
Fix linter
awolant May 21, 2024
61f75e4
Fix linter
awolant May 21, 2024
63027b3
Remove unused stuff
awolant May 22, 2024
fcb0eda
Refactor tests
awolant May 22, 2024
73e86a9
Update dates
awolant Jun 6, 2024
ea63a70
Address review comments
awolant Jun 6, 2024
f6e04a6
Merge remote-tracking branch 'nvidia/main' into video_decoder_plugin
awolant Jun 6, 2024
99a6865
Remove unused code
awolant Jun 6, 2024
af7c207
Fix tests
awolant Jun 6, 2024
dffd5b7
Fix error
awolant Jun 6, 2024
283251e
Add AV1 support
awolant Jun 6, 2024
fe1a10e
Fix linter
awolant Jun 6, 2024
12eba26
Merge remote-tracking branch 'nvidia/main' into add_av1_support
awolant Jun 17, 2024
cfec491
Update DALI extra version
awolant Jun 17, 2024
98a632d
Remove av1 from old tests
awolant Jun 17, 2024
efaccd4
Fix tests
awolant Jun 18, 2024
50dd438
Fix tests
awolant Jun 18, 2024
6f3c966
Fix tests
awolant Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DALI_EXTRA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4d95e862cc8aa6495707a3a6d84cbf75dff812ef
1ffbeaf1d085bb00f124038503508b3cb68e1a05
3 changes: 3 additions & 0 deletions dali/test/python/decoder/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
filenames = filter(lambda filename: "hevc" not in filename, filenames)
# mpeg4 is not yet supported in the CPU operator itself
filenames = filter(lambda filename: "mpeg4" not in filename, filenames)
filenames = filter(lambda filename: "av1" not in filename, filenames)

files = [np.fromfile(filename, dtype=np.uint8) for filename in filenames]

Expand Down Expand Up @@ -178,6 +179,7 @@ def input_gen(batch_size):
filenames.append(f"{get_dali_extra_path()}/db/video/cfr_test.mp4")
filenames = filter(lambda filename: "mpeg4" not in filename, filenames)
filenames = filter(lambda filename: "hevc" not in filename, filenames)
filenames = filter(lambda filename: "av1" not in filename, filenames)
filenames = cycle(filenames)
while True:
batch = []
Expand Down Expand Up @@ -211,6 +213,7 @@ def test_source_info(device):
filenames = filter(lambda filename: "hevc" not in filename, filenames)
# mpeg4 is not yet supported in the CPU operator itself
filenames = filter(lambda filename: "mpeg4" not in filename, filenames)
filenames = filter(lambda filename: "av1" not in filename, filenames)

files = list(filenames)

Expand Down
1 change: 1 addition & 0 deletions dali/test/python/input/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
filenames = filter(lambda filename: "hevc" not in filename, filenames)
# mpeg4 is not yet supported in the CPU operator
filenames = filter(lambda filename: "mpeg4" not in filename, filenames)
filenames = filter(lambda filename: "av1" not in filename, filenames)
files = [np.fromfile(filename, dtype=np.uint8) for filename in filenames]

batch_size_values = [1, 3, 100]
Expand Down
26 changes: 26 additions & 0 deletions dali/test/python/test_dali_video_plugin_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ def test_cfr_h265_mp4_decoding():
)


def test_cfr_av1_mp4_decoding():
try:
run_video_decoding_test(
get_dali_extra_path() + "/db/video/cfr/test_1_av1.mp4",
f"{get_dali_extra_path()}/db/video/cfr/frames_1/frames_list.txt",
f"{get_dali_extra_path()}/db/video/cfr/frames_1",
)
return
except Exception as e:
assert "Codec not supported on this GPU" in str(e), "Unexpected error message: {}".format(e)
return


def test_vfr_h264_mp4_decoding():
run_video_decoding_test(
get_dali_extra_path() + "/db/video/vfr/test_1.mp4",
Expand All @@ -88,3 +101,16 @@ def test_vfr_hevc_mp4_decoding():
f"{get_dali_extra_path()}/db/video/vfr/frames_1_hevc/frames_list.txt",
f"{get_dali_extra_path()}/db/video/vfr/frames_1_hevc",
)


def test_vfr_av1_mp4_decoding():
try:
run_video_decoding_test(
get_dali_extra_path() + "/db/video/vfr/test_1_av1.mp4",
f"{get_dali_extra_path()}/db/video/vfr/frames_1/frames_list.txt",
f"{get_dali_extra_path()}/db/video/vfr/frames_1",
)
return
except Exception as e:
assert "Codec not supported on this GPU" in str(e), "Unexpected error message: {}".format(e)
return
Loading