Skip to content

Commit

Permalink
Change function in SVT-AV1 0.9.0 (AOMediaCodec#807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamaika1 authored Jan 26, 2022
1 parent 7390bce commit 74a2144
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* - speed 8-9: re-test and re-adjust speed according to your app needs
* Update aom.cmd: v3.2.0
* Update dav1d.cmd: 0.9.2
* Update svt-av1.cmd: v0.9.0
* Pass TestCase's minQuantizer, maxQuantizer, speed to encoder.
* Regenerate tests.json
* Disable JSON-based tests for now, the metrics are inconsistent/unreliable
Expand Down
2 changes: 1 addition & 1 deletion ext/svt.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
: # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir):
: # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"

git clone -b v0.8.7 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
git clone -b v0.9.0 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git

cd SVT-AV1
cd Build/windows
Expand Down
2 changes: 1 addition & 1 deletion ext/svt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# then enable CMake's AVIF_CODEC_SVT and AVIF_LOCAL_SVT options.
# cmake and ninja must be in your PATH.

git clone -b v0.8.7 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git
git clone -b v0.9.0 --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git

cd SVT-AV1
cd Build/linux
Expand Down
6 changes: 6 additions & 0 deletions src/codec_svt.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
}
svt_config->encoder_color_format = color_format;
svt_config->encoder_bit_depth = (uint8_t)image->depth;
#if !SVT_AV1_CHECK_VERSION(0, 9, 0)
svt_config->is_16bit_pipeline = image->depth > 8;
#endif

// Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084.
svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 &&
Expand All @@ -104,8 +106,12 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
svt_config->logical_processors = encoder->maxThreads;
svt_config->enable_adaptive_quantization = AVIF_FALSE;
// disable 2-pass
#if SVT_AV1_CHECK_VERSION(0, 9, 0)
svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 };
#else
svt_config->rc_firstpass_stats_out = AVIF_FALSE;
svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 };
#endif

if (alpha) {
svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63);
Expand Down

0 comments on commit 74a2144

Please sign in to comment.