- May 17, 2021
-
-
Ralph Giles authored
The output code uses (width + n) >> k to round up to the nearest boundary in calculating buffer sizes. Because many people are uncertain about the relative precedence of addition and shift operations, gcc warned about the code as-written. Abstract the calculation into a local variable for better readability and add parentheses to address the warning.
-
Ralph Giles authored
It's not a large file, but it ends up being read up to three times, and this matches style with configfile.h.
-
Ralph Giles authored
Run the code through clang_format to clean up inconsistent whitespace. This also changed the brace style. Follow up with some manual reformatting of long doc comments mangled by clang_format, the config struct, and expand tabs in the config file. Also include global.h directly in configfile.h so the definition of `InputParameters` is available regardless of the include order.
-
Ralph Giles authored
Invoke the makefile so we get some build feedback on repositories hosted under gitlab.
-
Ralph Giles authored
The code uses the MSVC-specific `_itoa` function to format numbered filenames. Replace this with the portable `snprintf` which is already used elsewhere, and performs bounds checks. Also expand the allowed number of digits to avoid overflow. The previous assumption of no more that 5 digits is exceeded is less than an hour of video. The new maximum of 23 is enough for a 64-bit integer, so even without configuration validation it will work as well as the rest of the code does.
-
Ralph Giles authored
The code uses the `snprintf` function, standardized in C99. Prior to Visual Studio 2015 this was not supported on Microsoft Windows, so the code used a #define to map it to the `_snprintf` extension. The Makefile had the opposite define to undo this mapping for non-windows platforms. Since the fallback hasn't been necessary for some years, remove all references to _snprintf in favour of the standard library function.
-
Ralph Giles authored
The globals.h header declared a number of global variables as well as types, resulting in duplicate symbol warnings. This might have compiled 15 years ago, but it doesn't now. Instead, move the declarations into sgi2yuv.c where they are mostly used. The errortext global is converted to an extern in the header so it can also be used by the config file reader.
-
Ralph Giles authored
Move the declaration of `configinput` into the protected section of configfile.h so it's only active when included in configfile.c. This addresses a multily-defined symbol error with gcc 10 when configfile.h is included in other modules within the same target executable.
-
- May 15, 2021
-
-
Ralph Giles authored
This is a standard style nit and makes editing the file cleaner.
-
Ralph Giles authored
Apply a patch from derf (Timothy Terriberry) to access the image data in row-major instead of column-major order. This vastly improves cache coherency, speeding up the code significantly on modern architectures. The patch also adds a simple Makefile and cleans up various minor issues with the code.
-
Ralph Giles authored
This is the source of the 0.4 release of Tobias Oelbaum's sgi2yuv utility, for reading video in the format originally used by Irix Silicon Graphics workstations. This is from the zip file published in 2006 at http://www.ldv.ei.tum.de/Members/tobias/videotools/sgi2yuv.zip but excluding the compiled 32-bit Windows executable.
-