Commit 1f7eb216 authored by Muhammad Faiz's avatar Muhammad Faiz

swresample/options: enable linear_interp and exact_rational by default

better quality without speedloss
Signed-off-by: 's avatarMuhammad Faiz <mfcc64@gmail.com>
parent a3a40825
......@@ -132,12 +132,13 @@ For swr only, set resampling phase shift, default value is 10, and must be in
the interval [0,30].
@item linear_interp
Use linear interpolation if set to 1, default value is 0.
Use linear interpolation when enabled (the default). Disable it if you want
to preserve speed instead of quality when exact_rational fails.
@item exact_rational
For swr only, when enabled, try to use exact phase_count based on input and
output sample rate. However, if it is larger than @code{1 << phase_shift},
the phase_count will be @code{1 << phase_shift} as fallback. Default is disabled.
the phase_count will be @code{1 << phase_shift} as fallback. Default is enabled.
@item cutoff
Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
......
......@@ -84,8 +84,8 @@ static const AVOption options[]={
{"filter_size" , "set swr resampling filter size", OFFSET(filter_size) , AV_OPT_TYPE_INT , {.i64=32 }, 0 , INT_MAX , PARAM },
{"phase_shift" , "set swr resampling phase shift", OFFSET(phase_shift) , AV_OPT_TYPE_INT , {.i64=10 }, 0 , 24 , PARAM },
{"linear_interp" , "enable linear interpolation" , OFFSET(linear_interp) , AV_OPT_TYPE_BOOL , {.i64=0 }, 0 , 1 , PARAM },
{"exact_rational" , "enable exact rational" , OFFSET(exact_rational) , AV_OPT_TYPE_BOOL , {.i64=0 }, 0 , 1 , PARAM },
{"linear_interp" , "enable linear interpolation" , OFFSET(linear_interp) , AV_OPT_TYPE_BOOL , {.i64=1 }, 0 , 1 , PARAM },
{"exact_rational" , "enable exact rational" , OFFSET(exact_rational) , AV_OPT_TYPE_BOOL , {.i64=1 }, 0 , 1 , PARAM },
{"cutoff" , "set cutoff frequency ratio" , OFFSET(cutoff) , AV_OPT_TYPE_DOUBLE,{.dbl=0. }, 0 , 1 , PARAM },
/* duplicate option in order to work with avconv */
......
This diff is collapsed.
a69563c4c5db97d1b313c2fd7a193dd4 *tests/data/fate/acodec-s302m.mpegts
165d022ab86306d069797acff0c1e295 *tests/data/fate/acodec-s302m.mpegts
1589164 tests/data/fate/acodec-s302m.mpegts
2c033ed1d9029ed03e08c1d01dcefd99 *tests/data/fate/acodec-s302m.out.wav
stddev: 986.98 PSNR: 36.44 MAXDIFF:18642 bytes: 1058400/ 1056708
31f25a0020fd9017de9c3c608316854b *tests/data/fate/acodec-s302m.out.wav
stddev: 986.94 PSNR: 36.44 MAXDIFF:18571 bytes: 1058400/ 1056708
3bcb02ee889b8b2da19cae79d0f1c27d *./tests/data/lavf/lavf.dv
5a622e1ae4fd16bec59cd514380d7882 *./tests/data/lavf/lavf.dv
3600000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0x5a36cc70
f827583ae54e590d753c37709738fd54 *./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0x0a6edbd8
155e8fd4ea1196edd56ae9ff09edcf85 *./tests/data/lavf/lavf.dv
3480000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0x8f8074be
./tests/data/lavf/lavf.dv CRC=0x3e5583fa
87d3b20f656235671383a7eaa2f66330 *./tests/data/lavf/lavf.dv
3600000 ./tests/data/lavf/lavf.dv
./tests/data/lavf/lavf.dv CRC=0xf3e6873c
1b384e20293a84b274739c147e2b290a *./tests/data/lavf/lavf.gxf
6ef34e8bedf699cd1601022c4a0a4910 *./tests/data/lavf/lavf.gxf
795876 ./tests/data/lavf/lavf.gxf
./tests/data/lavf/lavf.gxf CRC=0x55b3ec1d
411f109b5867e5cb81bc876d3cc5702b *./tests/data/lavf/lavf.gxf
./tests/data/lavf/lavf.gxf CRC=0x1dbfef76
7780c428dde2c93a9ff04794f7168440 *./tests/data/lavf/lavf.gxf
794656 ./tests/data/lavf/lavf.gxf
./tests/data/lavf/lavf.gxf CRC=0x0d7e90ea
./tests/data/lavf/lavf.gxf CRC=0xdcd39443
0638c4d073ac224608baaba16732b68f *./tests/data/lavf/lavf.gxf
795876 ./tests/data/lavf/lavf.gxf
./tests/data/lavf/lavf.gxf CRC=0x5ade0285
2fd59c174dfb213d35e86dea63c0fb13 *./tests/data/lavf/lavf.mxf
eaac3125ac1a61fe5f968c7af83fa71e *./tests/data/lavf/lavf.mxf
525369 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x9fd3f752
edb3b610c301362d7b4c12f06f8d2782 *./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
1562530330b13e9e70f522fe20265632 *./tests/data/lavf/lavf.mxf
560697 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xc51717ef
a6ba421f38ee5ec46e181225c632fee4 *./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xf21b1b48
e07858715997313ae66a1cdd6fde5f66 *./tests/data/lavf/lavf.mxf
525369 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x9fd3f752
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment