From 0e90ff164e7da0fc6e739ba50b1e2c13a8deb471 Mon Sep 17 00:00:00 2001 From: Philippe Leprince Date: Wed, 10 Jan 2024 17:19:28 +0100 Subject: [PATCH] Add license headers. Clang-format example file. Clang-format deepExamples.cpp and fix a comment typo. Clang-format deepExamples.cpp and fix a comment typo. --- src/examples/deepExamples.cpp | 20 +++++++++++++------- src/lib/OpenEXR/ImfZstdCompressor.cpp | 5 +++++ src/lib/OpenEXR/ImfZstdCompressor.h | 6 ++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/examples/deepExamples.cpp b/src/examples/deepExamples.cpp index b28a0cf3bd..f7599084d5 100644 --- a/src/examples/deepExamples.cpp +++ b/src/examples/deepExamples.cpp @@ -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 // @@ -69,7 +69,8 @@ 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 @@ -77,7 +78,8 @@ readDeepScanlineFile ( "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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/lib/OpenEXR/ImfZstdCompressor.cpp b/src/lib/OpenEXR/ImfZstdCompressor.cpp index 48e742d591..d35a3deecd 100644 --- a/src/lib/OpenEXR/ImfZstdCompressor.cpp +++ b/src/lib/OpenEXR/ImfZstdCompressor.cpp @@ -1,3 +1,8 @@ +// +// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) Contributors to the OpenEXR Project. +// + #include #include "ImfZstdCompressor.h" diff --git a/src/lib/OpenEXR/ImfZstdCompressor.h b/src/lib/OpenEXR/ImfZstdCompressor.h index f1c9110dd0..d9319e076c 100644 --- a/src/lib/OpenEXR/ImfZstdCompressor.h +++ b/src/lib/OpenEXR/ImfZstdCompressor.h @@ -1,4 +1,10 @@ #pragma once + +// +// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) Contributors to the OpenEXR Project. +// + #include #include "ImfNamespace.h" #include "ImfCompressor.h"