Skip to content

Commit

Permalink
Merge branch 'main' into wslFix
Browse files Browse the repository at this point in the history
  • Loading branch information
mraduldubey authored Jul 17, 2023
2 parents 56f3325 + 7c922f6 commit 3b8432f
Show file tree
Hide file tree
Showing 40 changed files with 62,396 additions and 435 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-lin-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
submodules: 'recursive'
lfs: true
fetch-depth: 0

- name: List Submodules
run: |
git config --global --add safe.directory "*"
Expand Down
2 changes: 1 addition & 1 deletion base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ IF (ENABLE_CUDA)
test/cudamemcopy_tests.cpp
test/resizenppi_tests.cpp
test/rotatenppi_tests.cpp
test/ccnppi_tests.cpp
)
IF(NOT ENABLE_ARM64) # following tests need CUDA but can not run on ARM ?

Expand All @@ -486,7 +487,6 @@ IF (ENABLE_CUDA)
test/jpegdecodernvjpeg_tests.cpp
test/resizenppi_jpegencodernvjpeg_tests.cpp
test/nvjpeg_combo_tests.cpp
test/ccnppi_tests.cpp
test/overlaynppi_tests.cpp
test/effectsnppi_tests.cpp
test/h264Encodernvcodec_tests.cpp
Expand Down
4 changes: 3 additions & 1 deletion base/include/CCNPPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class CCNPPIProps : public ModuleProps
{
public:

CCNPPIProps(ImageMetadata::ImageType _imageType, cudastream_sp& _stream)
{
stream_sp = _stream;
Expand Down Expand Up @@ -49,6 +50,7 @@ class CCNPPI : public Module
int mOutputFrameType;
size_t mFrameLength;
framemetadata_sp mOutputMetadata;
framemetadata_sp mIntermediateMetadata;
std::string mOutputPinId;
CCNPPIProps props;
CCNPPIProps mProps;
};
14 changes: 13 additions & 1 deletion base/include/DMAAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class DMAAllocator : public HostAllocator
}
}

static void setMetadata(framemetadata_sp &metadata, int width, int height, ImageMetadata::ImageType imageType)
static void setMetadata(framemetadata_sp &metadata, int width, int height, ImageMetadata::ImageType imageType,size_t pitchValues[4] = nullptr, size_t offsetValues[4] = nullptr)
{
auto eglDisplay = ApraEGLDisplay::getEGLDisplay();
auto colorFormat = getColorFormat(imageType);
Expand Down Expand Up @@ -144,6 +144,10 @@ class DMAAllocator : public HostAllocator
auto inputRawMetadata = FrameMetadataFactory::downcast<RawImageMetadata>(metadata);
RawImageMetadata rawMetadata(width, height, imageType, type, fdParams.pitch[0], CV_8U, FrameMetadata::MemType::DMABUF, false);
inputRawMetadata->setData(rawMetadata);
if(pitchValues != nullptr)
{
pitchValues[0] = fdParams.pitch[0];
}
}
break;
case FrameMetadata::FrameType::RAW_IMAGE_PLANAR:
Expand All @@ -153,6 +157,14 @@ class DMAAllocator : public HostAllocator
for (auto i = 0; i < fdParams.num_planes; i++)
{
step[i] = fdParams.pitch[i];
if(pitchValues != nullptr)
{
pitchValues[i] = fdParams.pitch[i];
}
if(offsetValues != nullptr)
{
offsetValues[i] = fdParams.offset[i];
}
}
RawImagePlanarMetadata rawMetadata(width, height, imageType, step, CV_8U, FrameMetadata::MemType::DMABUF);
inputRawMetadata->setData(rawMetadata);
Expand Down
Loading

0 comments on commit 3b8432f

Please sign in to comment.