Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ void PyNvBatchAsyncGopDecoder::build_yuv_frame(Pixel_Format fmt, size_t H, size_
break;
// TODO(P016): LoadDLPack rejects "|u2" typestr, so no DLPack tensor can be built.
case Pixel_Format_P016:
out.views.push_back(CAIMemoryView{{H, W, 1}, {W, 1, 1}, "|u2", stream_id, dst_ptr, false});
out.views.push_back(CAIMemoryView{{H, W, 1}, {W * 2, 2, 2}, "|u2", stream_id, dst_ptr, false});
out.views.push_back(CAIMemoryView{
{H / 2, W / 2, 2}, {W / 2 * 2, 2, 1}, "|u2", stream_id, dst_ptr + 2 * H * W, false});
{H / 2, W / 2, 2}, {W * 2, 4, 2}, "|u2", stream_id, dst_ptr + 2 * H * W, false});
break;
// TODO(YUV444): needs a flat (H*3, W) DLPack view and extBuf support for 3-plane layouts.
case Pixel_Format_YUV444:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ int PyNvGopDecoder::GetYUVFromFrame(NvDecoder* decoder, const uint8_t* pFrame, u
} break;
case Pixel_Format_P016: {
decoded_frame.views.push_back(CAIMemoryView{{height, width, 1},
{width, 1, 1},
{width * 2, 2, 2},
"|u2",
reinterpret_cast<size_t>(decoder->GetStream()),
(CUdeviceptr)(pFrame_buffer),
false});
decoded_frame.views.push_back(
CAIMemoryView{{height / 2, width / 2, 2},
{width / 2 * 2, 2, 1},
{width * 2, 4, 2},
"|u2",
reinterpret_cast<size_t>(decoder->GetStream()),
(CUdeviceptr)(pFrame_buffer + 2 * (width * height)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,13 +721,13 @@ DecodedFrameExt PyNvVideoReader::returnYUVFrame(void* pFrame_buffer, void* pFram
} break;
case Pixel_Format_P016: {
frame.views.push_back(CAIMemoryView{{height, width, 1},
{width, 1, 1},
{width * 2, 2, 2},
"|u2",
reinterpret_cast<size_t>(this->decoder->GetStream()),
(CUdeviceptr)(pFrame_buffer),
false});
frame.views.push_back(CAIMemoryView{{height / 2, width / 2, 2},
{width / 2 * 2, 2, 1},
{width * 2, 4, 2},
"|u2",
reinterpret_cast<size_t>(this->decoder->GetStream()),
(CUdeviceptr)(pFrame_buffer + 2 * (width * height)),
Expand Down
2 changes: 1 addition & 1 deletion packages/on_demand_video_decoder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dynamic = ["version"]
description = "On-demand video decoder (part of the ACCV-Lab package)."
requires-python = ">=3.8"
dependencies = [
"torch>=2.0.0",
"torch>=2.3.0",
"numpy>=1.22.2",
]

Expand Down
15 changes: 15 additions & 0 deletions packages/on_demand_video_decoder/tests/common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Shared decoder conformance tests."""
Loading