summaryrefslogtreecommitdiffstats
path: root/compare
Commit message (Collapse)AuthorAgeFilesLines
* compare: fix 16-bit PNG read/write on big-endian platformsOleg Oshmyan2022-11-171-2/+7
|
* compare: support anamorphic scalingOleg Oshmyan2022-11-162-29/+43
| | | | | The division approximation broke down for 5x7 scaling, so adjust it to be right.
* compare: don't call qsort on NULL arrayOleg Oshmyan2022-11-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This works in practice but is explicitly forbidden in C99, C11 and C17 alike: > 7.20.5/7.22.5 Searching and sorting utilities > > [...] Where an argument declared as size_t nmemb specifies the length > of the array for a function, nmemb can have the value zero on a call to > that function; the comparison function is not called, [...] and sorting > performs no rearrangement. Pointer arguments on such a call shall still > have valid values, as described in 7.1.4. > 7.1.4 Use of library functions > > [...] If an argument to a function has an invalid value (such as [...] > a null pointer [...]) [...], the behavior is undefined. If a function > argument is described as being an array, the pointer actually passed > to the function shall have a value such that all address computations > and accesses to objects (that would be valid if the pointer did point > to the first element of such an array) are in fact valid. In contrast, qsort_s explicitly allows the array pointer argument to be NULL when nmemb == 0 (see C11/C17 K.3.6.3 Searching and sorting utilities). Fixes CID 402901 found by Coverity Scan.
* Switch to non-recursive MakefileOneric2022-05-121-7/+0
| | | | | | | | | | | | | | Non-recursive Makefiles allow better and more robust automatic dependency resolution and higher parallelism for shorter build-times. This change keeps all locations of the non-installed targets unchanged for minimal firction. Calling make from subdirectories no longer works, but instead the specific build targets can be invoked directly from the toplevel. If we bumped the required Automake version to 1.13+, the library fragment could use %reldir% or %D% to be unaffected by potential future directory moves, but it is unlikely we'll ever change the location or name of the libass directory.
* Avoid passing NULL to printf's %s if argc == 0Oneric2022-05-071-1/+1
| | | | This is undefined behaviour even if most libcs handle it gracefully.
* cosmetic/compare: comply with strict protoype rulesOneric2022-04-041-1/+1
| | | | | Empty identifier lists are an obsolescent feature and gcc complains about them with -Wstrict-prototypes.
* compare: fix _mkdir include on WindowsOneric2021-07-091-0/+1
| | | | | | To use Microsoft's _mkdir one must include direct.h, not sys/stat.h as for POSIX's mkdir. This is still true with modern MinGW headers used. The sys/stat.h include remains required for stat.
* compare: move libass log to stderrDr.Smile2021-06-101-3/+3
|
* compare: introduce customizable threshold to pass testDr.Smile2021-06-102-24/+71
|
* compare: use case-insensitive comparisons for file extensionsDr.Smile2021-06-101-17/+43
|
* compare: add support for multiple input directoriesDr.Smile2021-06-102-32/+44
|
* compare: reorganize codeDr.Smile2021-06-101-105/+100
|
* compare: fix compilation under MinGWDr.Smile2021-05-081-1/+7
| | | | | Replace missing strndup() with its standard C equivalent and circumvent unimplemented second argument of mkdir().
* compare: replace int with size_t for array sizes and string lengthsDr.Smile2021-05-031-7/+7
| | | | It's technically more correct.
* Fix embedded and memory fontsOneric2021-04-221-0/+1
| | | | | | | | | | | Previously only both only worked when ass_set_fonts was called after all embedded and memory fonts were already added. Especially for embedded fonts this meant it won't work for most users, except mpv, including our own utilities, even if extract_fonts was set. Now that it works, enable extract_fonts in our utilities. GitHub: fixes #266
* ass_library: Constify ass_add_fontHugo Beauzée-Luyssen2020-11-011-1/+1
| | | | | Both parameters are copied and are immutable. Make it clear through the function prototype
* compare: set storage size before renderingDr.Smile2020-10-151-0/+1
| | | | | | This is a measure to facilitate testing with different script and video resolutions. The target PNG file size (unscaled) is used as video size.
* compare: Fix millisecond zero paddingOneric2020-06-152-5/+5
| | | | | Padding should be 3 digits not 4, otherwise 2252ms are displayed as '0:00:02.0252' instead of '0:00:02.252'.
* Add infrastructure for regression testingDr.Smile2020-05-0713-0/+1011
`test` subdirectory contains complete test example.