Skip to content

Commit

Permalink
Add license headers. Clang-format example file.
Browse files Browse the repository at this point in the history
Clang-format deepExamples.cpp and fix a comment typo.

Clang-format deepExamples.cpp and fix a comment typo.
  • Loading branch information
pleprince authored and Philippe Leprince committed Jan 11, 2024
1 parent 574988e commit 0e90ff1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/examples/deepExamples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ readDeepScanlineFile (
// - allocate memory for the pixels
// - describe the layout of the A, and Z pixel buffers
// - read the sample counts from the file
// - allocate the memory requred to store the samples
// - allocate the memory required to store the samples
// - read the pixels from the file
//

Expand All @@ -69,15 +69,17 @@ readDeepScanlineFile (

frameBuffer.insertSampleCountSlice (Slice (
UINT,
(char*) (&sampleCount[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&sampleCount[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (unsigned int) * 1, // xStride
sizeof (unsigned int) * width)); // yStride

frameBuffer.insert (
"dataZ",
DeepSlice (
FLOAT,
(char*) (&dataZ[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataZ[0][0] - dataWindow.min.x -
dataWindow.min.y * width),

sizeof (float*) * 1, // xStride for pointer array
sizeof (float*) * width, // yStride for pointer array
Expand All @@ -87,7 +89,8 @@ readDeepScanlineFile (
"dataA",
DeepSlice (
HALF,
(char*) (&dataA[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataA[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (half*) * 1, // xStride for pointer array
sizeof (half*) * width, // yStride for pointer array
sizeof (half) * 1)); // stride for O data sample
Expand Down Expand Up @@ -176,7 +179,8 @@ writeDeepScanlineFile (

frameBuffer.insertSampleCountSlice (Slice (
UINT,
(char*) (&sampleCount[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&sampleCount[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (unsigned int) * 1, // xS

sizeof (unsigned int) * width)); // yStride
Expand All @@ -185,7 +189,8 @@ writeDeepScanlineFile (
"Z",
DeepSlice (
FLOAT,
(char*) (&dataZ[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataZ[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (float*) * 1, // xStride for pointer

sizeof (float*) * width, // yStride for pointer array
Expand All @@ -195,7 +200,8 @@ writeDeepScanlineFile (
"A",
DeepSlice (
HALF,
(char*) (&dataA[0][0] - dataWindow.min.x - dataWindow.min.y * width),
(char*) (&dataA[0][0] - dataWindow.min.x -
dataWindow.min.y * width),
sizeof (half*) * 1, // xStride for pointer array
sizeof (half*) * width, // yStride for pointer array
sizeof (half) * 1)); // stride for A data sample
Expand Down
5 changes: 5 additions & 0 deletions src/lib/OpenEXR/ImfZstdCompressor.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) Contributors to the OpenEXR Project.
//

#include <cstring>
#include "ImfZstdCompressor.h"

Expand Down
6 changes: 6 additions & 0 deletions src/lib/OpenEXR/ImfZstdCompressor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#pragma once

//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) Contributors to the OpenEXR Project.
//

#include <memory>
#include "ImfNamespace.h"
#include "ImfCompressor.h"
Expand Down

0 comments on commit 0e90ff1

Please sign in to comment.