Downsample¶
https://github.com/Freed-Wu/x264-dsp/tree/main/scripts provides matlab
(octave), opencv, pytorch’s results of bilinear and bicubic. The bilinear
results are same. The bicubic results are not same. Because bicubic depends on
two factors: a and padding method.
a¶
matlab(octave)’sais -0.5.opencvandpytorch’sais -0.75.We use
-0.5because it has a fast algorithm:
Padding Method¶
matlab(octave) use symmetric padding.opencvandpytorchuse reflect padding.We use symmetric padding by default. You can change it by
./configure --padding=X.
Unit Test¶
Install check, then:
$ make check
...
PASS: check_downsample
============================================================================
Testsuite summary for x264 UNKNOWN
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
...
$ tests/check_downsample
Running suite(s): Core
100%: Checks: 5, Failures: 0, Errors: 0