From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 310D14F6F7 for ; Fri, 20 Jun 2025 17:51:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E4E4268CF62; Fri, 20 Jun 2025 20:51:01 +0300 (EEST) Date: Fri, 20 Jun 2025 17:50:48 +0000 To: FFmpeg development discussions and patches In-Reply-To: <20250613200241.2994917-1-tmatth@videolan.org> References: <20250613200241.2994917-1-tmatth@videolan.org> MIME-Version: 1.0 Message-ID: List-Id: FFmpeg development discussions and patches List-Post: From: Tristan Matthews via ffmpeg-devel Precedence: list Cc: Tristan Matthews , Tristan Matthews X-Mailman-Version: 2.1.29 X-BeenThere: ffmpeg-devel@ffmpeg.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: FFmpeg development discussions and patches List-Help: Subject: Re: [FFmpeg-devel] [PATCH] h264dsp: h264_luma_dc_dequant_idct: constify input Content-Type: multipart/mixed; boundary="===============4694747053614924708==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4694747053614924708== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-24427.protonmail.ch (mail-24427.protonmail.ch [109.224.244.27]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B2E9468C7C7 for ; Fri, 20 Jun 2025 20:50:55 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1750441854; x=1750701054; bh=It5Vx+l1QpYMdcFRZGhHsRPTJPh9gy7ksvmEdgmz8ME=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=J1rMOZMEfoDImFhYGNI9/m/4yXsyVKLCO5nU+H9UDFPxo0UmY0/nU3fbD6oLuF4sO p2VHzp3koWtpBphS9thtC4gW4VljrmbOyp+6xG01qqcvsaKvy3FgO7VE5+78TSlukk 87ONsW5KyVTeoXyX93K1bn5IAFRezKodCBgSF0Txv4weerghBvwqaEl38h5R4NyWzO qxDPLm+cZycSK2PIiQaxeOEyldKnOt5Hm71V+zzmbcRlH7m162RXcQCBBz9GXenhvt 8vS4Gaas6hLDdDlyV6PMU1gREJSLN7sk0kgjE41sZutQ2l230cR6OZeSMfRIqMPmRL +WNgGj+sP0Qng== Date: Fri, 20 Jun 2025 17:50:48 +0000 To: FFmpeg development discussions and patches From: Tristan Matthews Cc: Tristan Matthews Subject: Re: [FFmpeg-devel] [PATCH] h264dsp: h264_luma_dc_dequant_idct: constify input Message-ID: In-Reply-To: <20250613200241.2994917-1-tmatth@videolan.org> References: <20250613200241.2994917-1-tmatth@videolan.org> Feedback-ID: 32895411:user:proton X-Pm-Message-ID: f665f2faa9a7719c0b05009455a5b434fb38d9f0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Friday, June 13th, 2025 at 4:03 PM, Tristan Matthews wrote: > --- > libavcodec/h264dsp.h | 2 +- > libavcodec/h264idct.h | 2 +- > libavcodec/h264idct_template.c | 2 +- > libavcodec/loongarch/h264dsp_loongarch.h | 2 +- > libavcodec/loongarch/h264idct.S | 2 +- > libavcodec/mips/h264dsp_mips.h | 2 +- > libavcodec/mips/h264dsp_mmi.c | 2 +- > libavcodec/x86/h264_idct.asm | 2 +- > libavcodec/x86/h264dsp_init.c | 2 +- > 9 files changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h > index 4a9cb1568d..4733288b4a 100644 > --- a/libavcodec/h264dsp.h > +++ b/libavcodec/h264dsp.h > @@ -100,7 +100,7 @@ typedef struct H264DSPContext { > int16_t *block /align 16/, > int stride, const uint8_t nnzc[5 * 8]); > void (*h264_luma_dc_dequant_idct)(int16_t *output, > - int16_t *input /align 16/, int qmul); > + const int16_t *input /align 16/, int qmul); > void (*h264_chroma_dc_dequant_idct)(int16_t block, int qmul); >=20 > / bypass-transform */ > diff --git a/libavcodec/h264idct.h b/libavcodec/h264idct.h > index 6f18df9e5f..8e0b21561a 100644 > --- a/libavcodec/h264idct.h > +++ b/libavcodec/h264idct.h > @@ -31,7 +31,7 @@ void ff_h264_idct_add16intra_ ## depth ## c(uint8_t *ds= t, const int *blockoffse > void ff_h264_idct8_add4 ## depth ## c(uint8_t *dst, const int *blockoffse= t, int16_t *block, int stride, const uint8_t nnzc[5 * 8]);\ > void ff_h264_idct_add8_422 ## depth ## c(uint8_t **dest, const int *block= offset, int16_t *block, int stride, const uint8_t nnzc[15 * 8]);\ > void ff_h264_idct_add8 ## depth ## c(uint8_t **dest, const int *blockoffs= et, int16_t *block, int stride, const uint8_t nnzc[15 * 8]);\ > -void ff_h264_luma_dc_dequant_idct ## depth ## c(int16_t *output, int16_t= *input, int qmul);\ > +void ff_h264_luma_dc_dequant_idct ## depth ## c(int16_t *output, const i= nt16_t *input, int qmul);\ > void ff_h264_chroma422_dc_dequant_idct ## depth ## c(int16_t *block, int = qmul);\ > void ff_h264_chroma_dc_dequant_idct ## depth ## _c(int16_t block, int qmu= l); >=20 > diff --git a/libavcodec/h264idct_template.c b/libavcodec/h264idct_templat= e.c > index db19b5f9fb..72fec8253b 100644 > --- a/libavcodec/h264idct_template.c > +++ b/libavcodec/h264idct_template.c > @@ -248,7 +248,7 @@ void FUNCC(ff_h264_idct_add8_422)(uint8_t dest, const= int *block_offset, int16 > * IDCT transforms the 16 dc values and dequantizes them. > * @param qmul quantization parameter > */ > -void FUNCC(ff_h264_luma_dc_dequant_idct)(int16_t *_output, int16_t *_inp= ut, int qmul){ > +void FUNCC(ff_h264_luma_dc_dequant_idct)(int16_t *_output, const int16_t= *_input, int qmul){ > #define stride 16 > int i; > int temp[16]; > diff --git a/libavcodec/loongarch/h264dsp_loongarch.h b/libavcodec/loonga= rch/h264dsp_loongarch.h > index e17522dfe0..d51d27fe17 100644 > --- a/libavcodec/loongarch/h264dsp_loongarch.h > +++ b/libavcodec/loongarch/h264dsp_loongarch.h > @@ -30,7 +30,7 @@ void ff_h264_idct_add_8_lsx(uint8_t *dst, int16_t *src,= int dst_stride); > void ff_h264_idct8_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride); > void ff_h264_idct_dc_add_8_lsx(uint8_t *dst, int16_t *src, int dst_stride= ); > void ff_h264_idct8_dc_add_8_lsx(uint8_t *dst, int16_t *src, int dst_strid= e); > -void ff_h264_luma_dc_dequant_idct_8_lsx(int16_t *_output, int16_t *_inpu= t, int qmul); > +void ff_h264_luma_dc_dequant_idct_8_lsx(int16_t *_output, const int16_t = *_input, int qmul); > void ff_h264_idct_add16_8_lsx(uint8_t *dst, const int32_t blk_offset, > int16_t block, int32_t dst_stride, > const uint8_t nzc[15 * 8]); > diff --git a/libavcodec/loongarch/h264idct.S b/libavcodec/loongarch/h264i= dct.S > index f504cfb714..0c9082e20c 100644 > --- a/libavcodec/loongarch/h264idct.S > +++ b/libavcodec/loongarch/h264idct.S > @@ -612,7 +612,7 @@ endfunc > / > * IDCT transforms the 16 dc values and dequantizes them. > * @param qmul quantization parameter > - * void FUNCC(ff_h264_luma_dc_dequant_idct)(int16_t *_output, int16_t *_= input, int qmul){ > + * void FUNCC(ff_h264_luma_dc_dequant_idct)(int16_t *_output, const int1= 6_t *_input, int qmul){ > * LSX optimization is enough for this function. > */ > function ff_h264_luma_dc_dequant_idct_8_lsx > diff --git a/libavcodec/mips/h264dsp_mips.h b/libavcodec/mips/h264dsp_mip= s.h > index 4a2a2c2559..0edfad4434 100644 > --- a/libavcodec/mips/h264dsp_mips.h > +++ b/libavcodec/mips/h264dsp_mips.h > @@ -338,7 +338,7 @@ void ff_h264_idct_add8_8_mmi(uint8_t dest, const int = *block_offset, > int16_t block, int stride, const uint8_t nnzc[158]); > void ff_h264_idct_add8_422_8_mmi(uint8_t dest, const int *block_offset, > int16_t block, int stride, const uint8_t nnzc[158]); > -void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input, > +void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, const int16_t *= input, > int qmul); >=20 > void ff_h264_weight_pixels16_8_mmi(uint8_t *block, ptrdiff_t stride, int = height, > diff --git a/libavcodec/mips/h264dsp_mmi.c b/libavcodec/mips/h264dsp_mmi.= c > index bae1052dcf..c1c17867fe 100644 > --- a/libavcodec/mips/h264dsp_mmi.c > +++ b/libavcodec/mips/h264dsp_mmi.c > @@ -857,7 +857,7 @@ void ff_h264_idct_add8_422_8_mmi(uint8_t dest, const = int *block_offset, > } > } >=20 > -void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input, > +void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, const int16_t *= input, > int qmul) > { > double ftmp[10]; > diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm > index d9c3c9c862..a8160b4ccc 100644 > --- a/libavcodec/x86/h264_idct.asm > +++ b/libavcodec/x86/h264_idct.asm > @@ -612,7 +612,7 @@ cglobal h264_idct_add8_8, 5, 7 + ARCH_X86_64, 8 > add8_sse2_cycle 3, 0x64 > RET >=20 > -;void ff_h264_luma_dc_dequant_idct_mmx(int16_t *output, int16_t *input, = int qmul) > +;void ff_h264_luma_dc_dequant_idct_mmx(int16_t *output, const int16_t *i= nput, int qmul) >=20 > %macro WALSH4_1D 5 > SUMSUB_BADC w, %4, %3, %2, %1, %5 > diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.= c > index dc8fc4f720..f8cfeb965f 100644 > --- a/libavcodec/x86/h264dsp_init.c > +++ b/libavcodec/x86/h264dsp_init.c > @@ -76,7 +76,7 @@ IDCT_ADD_REP_FUNC2(, 8_422, 8, mmx) > IDCT_ADD_REP_FUNC2(, 8_422, 10, sse2) > IDCT_ADD_REP_FUNC2(, 8_422, 10, avx) >=20 > -void ff_h264_luma_dc_dequant_idct_sse2(int16_t *output, int16_t *input, = int qmul); > +void ff_h264_luma_dc_dequant_idct_sse2(int16_t *output, const int16_t *i= nput, int qmul); >=20 > /***************************/ > / deblocking */ > -- > 2.48.1 >=20 On second thought maybe this should be dropped as some ASM implementations = may want to use the input buffer as scratch space. --===============4694747053614924708== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============4694747053614924708==--