Re: [b...@comstyle.com: Re: UPDATE: SVT-AV1 1.4.1]

2023-04-10 Thread Rafael Sadowski
Committed

On Sun Apr 09, 2023 at 02:51:00PM -0400, Brad Smith wrote:
> ping.
> 
> 
> - Forwarded message from Brad Smith  -
> 
> Date: Thu, 12 Jan 2023 22:25:23 -0500
> From: Brad Smith 
> To: ports@openbsd.org
> Subject: Re: UPDATE: SVT-AV1 1.4.1
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) 
> Gecko/20100101 Thunderbird/109.0
> 
> ping.
> 
> On 12/16/2022 9:07 PM, Brad Smith wrote:
> > Here is an update to SVT-AV1 1.4.1.
> > 
> > 
> > ## [1.4.1] - 2022-12-12
> > 
> > Bugfixes:
> > - Fix CRF with maxrate bug causing bitrate to be significantly limited for 
> > CRF encodings
> > - Fix command line parsing forcing 1-pass in a 2-pass encoding mode when 
> > the --keyint=`x`s format is used
> > - Fix decoder segfault due to assuming aligned buffers in the inverse 
> > transform assembly
> > 
> > 
> > Index: Makefile
> > ===
> > RCS file: /home/cvs/ports/multimedia/svt-av1/Makefile,v
> > retrieving revision 1.12
> > diff -u -p -u -p -r1.12 Makefile
> > --- Makefile12 Dec 2022 13:51:34 -  1.12
> > +++ Makefile17 Dec 2022 02:06:38 -
> > @@ -2,10 +2,9 @@ ONLY_FOR_ARCHS=${LP64_ARCHS} i386
> >   COMMENT=  scalable AV1 encoder/decoder
> > -VER=   1.4.0
> > +VER=   1.4.1
> >   DISTNAME= SVT-AV1-v${VER}
> >   PKGNAME=  svt-av1-${VER}
> > -REVISION=  0
> >   CATEGORIES=   multimedia
> >   MASTER_SITES= 
> > https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${VER}/
> >   EXTRACT_SUFX= .tar.bz2
> > Index: distinfo
> > ===
> > RCS file: /home/cvs/ports/multimedia/svt-av1/distinfo,v
> > retrieving revision 1.10
> > diff -u -p -u -p -r1.10 distinfo
> > --- distinfo4 Dec 2022 20:12:56 -   1.10
> > +++ distinfo16 Dec 2022 22:17:17 -
> > @@ -1,2 +1,2 @@
> > -SHA256 (SVT-AV1-v1.4.0.tar.bz2) = 
> > 0jZFfrC4OXFrNgnbLObbYsEDocoOni7tAjnhlLcr3NA=
> > -SIZE (SVT-AV1-v1.4.0.tar.bz2) = 9437631
> > +SHA256 (SVT-AV1-v1.4.1.tar.bz2) = 
> > DpiFgvMV/nbJCazPXn+BuXXFvSuFDudg2On6wpf3C10=
> > +SIZE (SVT-AV1-v1.4.1.tar.bz2) = 9440077
> > Index: patches/patch-CMakeLists_txt
> > ===
> > RCS file: patches/patch-CMakeLists_txt
> > diff -N patches/patch-CMakeLists_txt
> > --- patches/patch-CMakeLists_txt4 Dec 2022 20:12:56 -   1.7
> > +++ /dev/null   1 Jan 1970 00:00:00 -
> > @@ -1,15 +0,0 @@
> > -build: fix CMake version detection
> > -5cca0f013508b482cbdd2e2fa96b201fe3924d95
> > -
> > -Index: CMakeLists.txt
> >  CMakeLists.txt.orig
> > -+++ CMakeLists.txt
> > -@@ -287,7 +287,7 @@ endmacro()
> > -
> > - option(SVT_AV1_LTO "Attempt to enable Link Time Optimization if 
> > available" OFF)
> > - if(SVT_AV1_LTO)
> > --if(CMAKE_VERSION GREATER_EQUAL 3.9)
> > -+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.9)
> > - include(CheckIPOSupported)
> > - check_ipo_supported(RESULT svt_av1_ipo_supported)
> > - if(svt_av1_ipo_supported AND NOT DEFINED 
> > CMAKE_INTERPROCEDURAL_OPTIMIZATION)
> > Index: patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> > ===
> > RCS file: patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> > diff -N patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> > --- patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c   12 Dec 
> > 2022 13:51:34 -  1.1
> > +++ /dev/null   1 Jan 1970 00:00:00 -
> > @@ -1,32 +0,0 @@
> > -Fix Quality Degradation When MaxBitRate Specified, Issue #2017
> > -b4c89396fa22791570c3992f9c56a6a65bdaca48
> > -
> > -Index: Source/Lib/Encoder/Codec/EbRateControlProcess.c
> >  Source/Lib/Encoder/Codec/EbRateControlProcess.c.orig
> > -+++ Source/Lib/Encoder/Codec/EbRateControlProcess.c
> > -@@ -873,6 +873,11 @@ static int crf_qindex_calc(PictureControlSet *pcs, RAT
> > - }
> > - // Scale r0 based on the GOP structure
> > - ppcs->r0 = ppcs->r0 / 
> > tpl_hl_islice_div_factor[scs_ptr->max_heirachical_level];
> > -+
> > -+// when frames_to_key not available, i.e. in 1 pass encoding
> > -+rc->kf_boost  = get_cqp_kf_boost_from_r0(ppcs->r0, -1, 
> > scs_ptr->input_resolution);
> > -+int max_boost = ppcs->used_tpl_frame_num * KB;
> > -+rc->kf_boost  = AOMMIN(rc->kf_boost, max_boost);
> > - } else {
> > - if (use_qstep_based_q_calc) {
> > - if (ppcs->tpl_ctrls.r0_adjust_factor) {
> > -@@ -881,6 +886,13 @@ static int crf_qindex_calc(PictureControlSet *pcs, RAT
> > - ppcs->r0 = ppcs->r0 / 
> > tpl_hl_base_frame_div_factor[scs_ptr->max_heirachical_level];
> > - }
> > - }
> > -+intnum_stats_required_for_gfu_boost = ppcs->tpl_group_size + 
> > (1 << hierarchical_levels);
> > -+double min_boost_factor

[b...@comstyle.com: Re: UPDATE: SVT-AV1 1.4.1]

2023-04-09 Thread Brad Smith
ping.


- Forwarded message from Brad Smith  -

Date: Thu, 12 Jan 2023 22:25:23 -0500
From: Brad Smith 
To: ports@openbsd.org
Subject: Re: UPDATE: SVT-AV1 1.4.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 
Thunderbird/109.0

ping.

On 12/16/2022 9:07 PM, Brad Smith wrote:
> Here is an update to SVT-AV1 1.4.1.
> 
> 
> ## [1.4.1] - 2022-12-12
> 
> Bugfixes:
> - Fix CRF with maxrate bug causing bitrate to be significantly limited for 
> CRF encodings
> - Fix command line parsing forcing 1-pass in a 2-pass encoding mode when the 
> --keyint=`x`s format is used
> - Fix decoder segfault due to assuming aligned buffers in the inverse 
> transform assembly
> 
> 
> Index: Makefile
> ===
> RCS file: /home/cvs/ports/multimedia/svt-av1/Makefile,v
> retrieving revision 1.12
> diff -u -p -u -p -r1.12 Makefile
> --- Makefile  12 Dec 2022 13:51:34 -  1.12
> +++ Makefile  17 Dec 2022 02:06:38 -
> @@ -2,10 +2,9 @@ ONLY_FOR_ARCHS=  ${LP64_ARCHS} i386
>   COMMENT=scalable AV1 encoder/decoder
> -VER= 1.4.0
> +VER= 1.4.1
>   DISTNAME=   SVT-AV1-v${VER}
>   PKGNAME=svt-av1-${VER}
> -REVISION=0
>   CATEGORIES= multimedia
>   MASTER_SITES=   
> https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${VER}/
>   EXTRACT_SUFX=   .tar.bz2
> Index: distinfo
> ===
> RCS file: /home/cvs/ports/multimedia/svt-av1/distinfo,v
> retrieving revision 1.10
> diff -u -p -u -p -r1.10 distinfo
> --- distinfo  4 Dec 2022 20:12:56 -   1.10
> +++ distinfo  16 Dec 2022 22:17:17 -
> @@ -1,2 +1,2 @@
> -SHA256 (SVT-AV1-v1.4.0.tar.bz2) = 
> 0jZFfrC4OXFrNgnbLObbYsEDocoOni7tAjnhlLcr3NA=
> -SIZE (SVT-AV1-v1.4.0.tar.bz2) = 9437631
> +SHA256 (SVT-AV1-v1.4.1.tar.bz2) = 
> DpiFgvMV/nbJCazPXn+BuXXFvSuFDudg2On6wpf3C10=
> +SIZE (SVT-AV1-v1.4.1.tar.bz2) = 9440077
> Index: patches/patch-CMakeLists_txt
> ===
> RCS file: patches/patch-CMakeLists_txt
> diff -N patches/patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt  4 Dec 2022 20:12:56 -   1.7
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,15 +0,0 @@
> -build: fix CMake version detection
> -5cca0f013508b482cbdd2e2fa96b201fe3924d95
> -
> -Index: CMakeLists.txt
>  CMakeLists.txt.orig
> -+++ CMakeLists.txt
> -@@ -287,7 +287,7 @@ endmacro()
> -
> - option(SVT_AV1_LTO "Attempt to enable Link Time Optimization if available" 
> OFF)
> - if(SVT_AV1_LTO)
> --if(CMAKE_VERSION GREATER_EQUAL 3.9)
> -+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.9)
> - include(CheckIPOSupported)
> - check_ipo_supported(RESULT svt_av1_ipo_supported)
> - if(svt_av1_ipo_supported AND NOT DEFINED 
> CMAKE_INTERPROCEDURAL_OPTIMIZATION)
> Index: patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> ===
> RCS file: patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> diff -N patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c
> --- patches/patch-Source_Lib_Encoder_Codec_EbRateControlProcess_c 12 Dec 
> 2022 13:51:34 -  1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,32 +0,0 @@
> -Fix Quality Degradation When MaxBitRate Specified, Issue #2017
> -b4c89396fa22791570c3992f9c56a6a65bdaca48
> -
> -Index: Source/Lib/Encoder/Codec/EbRateControlProcess.c
>  Source/Lib/Encoder/Codec/EbRateControlProcess.c.orig
> -+++ Source/Lib/Encoder/Codec/EbRateControlProcess.c
> -@@ -873,6 +873,11 @@ static int crf_qindex_calc(PictureControlSet *pcs, RAT
> - }
> - // Scale r0 based on the GOP structure
> - ppcs->r0 = ppcs->r0 / 
> tpl_hl_islice_div_factor[scs_ptr->max_heirachical_level];
> -+
> -+// when frames_to_key not available, i.e. in 1 pass encoding
> -+rc->kf_boost  = get_cqp_kf_boost_from_r0(ppcs->r0, -1, 
> scs_ptr->input_resolution);
> -+int max_boost = ppcs->used_tpl_frame_num * KB;
> -+rc->kf_boost  = AOMMIN(rc->kf_boost, max_boost);
> - } else {
> - if (use_qstep_based_q_calc) {
> - if (ppcs->tpl_ctrls.r0_adjust_factor) {
> -@@ -881,6 +886,13 @@ static int crf_qindex_calc(PictureControlSet *pcs, RAT
> - ppcs->r0 = ppcs->r0 / 
> tpl_hl_base_frame_div_factor[scs_ptr->max_heirachical_level];
> - }
> - }
> -+intnum_stats_required_for_gfu_boost = ppcs->tpl_group_size + (1 
> << hierarchical_levels);
> -+double min_boost_factor = (int32_t)1 << 
> (hierarchical_levels >> 1);
> -+if (hierarchical_levels & 1) {
> -+min_boost_factor *= CONST_SQRT2;
> -+}
> -+rc->gfu_boost = get_gfu_boost_from_r0_lap(
> -+min_boost_factor, MAX_GFUBOOST_FACTOR, ppcs->r0, 
> num_stats_required_for_gfu_boost);
> - }
> -
> - q =