If CS conversion is done, handle also full-range input. This shouldn't be
the case most of the time (we use always limited range) but the case that
is handled is namely a JPEG from a webcam or so, which is 601
limited. Full YCbCr->YCbCr is not handled by this commit.
Start rewrite with coefficients not hard-coded in the macro. For the
beginning, the new implementation used in pixfmt_conv.o. From
the performance evaluation it doesn't have impact on performance
(`tools/convert benchmark`).
For the benchmark, we use -Ofast in UltraGrid so make it the same.
It won't break anything for the rest of the objects so make it default
instead of writing a custom rule for pixfmt_conv.o.
The .o files are no longer directly in the root of tools/ but in the
respective subdirectories as in sources in src/. Used find command
instead of wildard because the objects may be deeper in src/.
backtrace_symbols has slightly different output than backtrace_symbols_fd:
```./build/bin/uv(+0x24d92)[0x7b9c947ad92]```
In the first, there is a space between `(+0x24d92)` and `[0x7b9c947ad92]`:
```./build/bin/uv(+0x24d92) [0x7b9c947ad92]```
so support both syntaxes (the absolute address is ignored anyways,
there were just missing quotes around a variable)
\+ added some direct pixfmt_conv.h includes (in attempt to remove its
inclusion from video_codec.h, which finally didn't take place but still
it is better to include this directly)
Just the conversions grew to a significant amount so it is better to
split the file to two to keep the general video codec utility functions
in one file and the conversions in the another.
Build even UG obj files in tools/ subdirectory if make called there
(because color_out.o builds differently for `convert` and `uv` not to be
used interchangeably).
- supported also out-of-tree build when SRCDIR was passed, eg.:
mkdir build && cd build
make -f ../tools/Makefile SRCDIR=.. convert
+ decklink_temperature to gitignore
- moved macros to utils/macros.h (not config_common.h that is not going
to be included) and include in config_common.h the macros.h file
instead (later it should be removed)
- avoid dependency of color_out.o on host.o if build outside UG (easiest
for now)
- compile tools with '-g' (obviously for better debuggability)
if eg. input file doesn't exist, something like:
terminate called after throwing an instance of 'std::__ios_failure'
what(): basic_ios::clear: iostream error
was presented which isn't much helpful so catch the error and print
textual representation of errno so that the error becomes:
ERROR: basic_ios::clear: iostream error: No such file or directory
04c2d245 changed the datatype to the SOCKET type used by the winsock
library. This type is however unsigned, which broke conditions that
assumed invalid socket to be < 0.