From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0B062443A8 for ; Wed, 7 Sep 2022 22:48:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 23DCB68B94F; Thu, 8 Sep 2022 01:48:03 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 38F4B68B737 for ; Thu, 8 Sep 2022 01:47:56 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 959FC60004 for ; Wed, 7 Sep 2022 22:47:55 +0000 (UTC) Date: Thu, 8 Sep 2022 00:47:54 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220907224754.GX2088045@pb2> References: <4A93DFDD-CAF2-43B7-ABF9-44D55AF4DAA3@360.cn> <20329BA6-86A0-411E-86A1-6B27E14D1E23@loongson.cn> MIME-Version: 1.0 In-Reply-To: <20329BA6-86A0-411E-86A1-6B27E14D1E23@loongson.cn> Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============0773584291783051946==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0773584291783051946== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TKxMeUgs2YHnbgRP" Content-Disposition: inline --TKxMeUgs2YHnbgRP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 06, 2022 at 07:34:14PM +0800, Shiyou Yin wrote: >=20 >=20 > > 2022=E5=B9=B48=E6=9C=8818=E6=97=A5 20:29=EF=BC=8CShiyou Yin =E5=86=99=E9=81=93=EF=BC=9A > >=20 > >=20 > >=20 > >> 2022=E5=B9=B48=E6=9C=8818=E6=97=A5 19:44=EF=BC=8C=E6=88=9A=E9=93=81=E9= =93=AE > =E5=86=99=E9=81=93=EF= =BC=9A > >>=20 > >>=20 > >> At 2022/8/18 PM 7:01, "Qi Tiezheng" > wrote: > >>=20 > >>> The latest commit of Loongson MMI macro replaces were incorrect. > >>> It makes a mass of green tints on HEVC videos when playing. I've > >>> compared it with the older MMI implementation, and found out that > >>> several lines have been replaced by wrong macros. > >>>=20 > >>> Signed-off-by: Qi Tiezheng > > >>> --- > >>> libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++-------- > >>> 1 file changed, 8 insertions(+), 8 deletions(-) > >>>=20 > >>> diff --git a/libavcodec/mips/hevcdsp_mmi.c b/libavcodec/mips/hevcdsp_= mmi.c > >>> index 0ea88a7c08..1da56d3d87 100644 > >>> --- a/libavcodec/mips/hevcdsp_mmi.c > >>> +++ b/libavcodec/mips/hevcdsp_mmi.c > >>> @@ -80,7 +80,7 @@ void ff_hevc_put_hevc_qpel_h##w##_8_mmi(int16_t *ds= t, const uint8_t *_src, \ > >>> "paddh %[ftmp3], %[ftmp3], %[ftmp4] \n\t" \ > >>> "paddh %[ftmp5], %[ftmp5], %[ftmp6] \n\t" \ > >>> "paddh %[ftmp3], %[ftmp3], %[ftmp5] \n\t" \ > >>> - MMI_ULDC1(%[ftmp3], %[dst], 0x00) \ > >>> + MMI_USDC1(%[ftmp3], %[dst], 0x00) \ > >>> \ > >>> "daddi %[x], %[x], -0x01 \n\t" \ > >>> PTR_ADDIU "%[src], %[src], 0x04 \n\t" \ > >>> @@ -178,7 +178,7 @@ void ff_hevc_put_hevc_qpel_hv##w##_8_mmi(int16_t = *dst, const uint8_t *_src,\ > >>> "paddh %[ftmp3], %[ftmp3], %[ftmp4] \n\t" \ > >>> "paddh %[ftmp5], %[ftmp5], %[ftmp6] \n\t" \ > >>> "paddh %[ftmp3], %[ftmp3], %[ftmp5] \n\t" \ > >>> - MMI_ULDC1(%[ftmp3], %[tmp], 0x00) \ > >>> + MMI_USDC1(%[ftmp3], %[tmp], 0x00) \ > >>> \ > >>> "daddi %[x], %[x], -0x01 \n\t" \ > >>> PTR_ADDIU "%[src], %[src], 0x04 \n\t" \ > >>> @@ -690,10 +690,10 @@ void ff_hevc_put_hevc_epel_bi_hv##w##_8_mmi(uin= t8_t *_dst, \ > >>> \ > >>> "1: \n\t" \ > >>> "2: \n\t" \ > >>> - MMI_ULDC1(%[ftmp3], %[src], 0x00) \ > >>> - MMI_ULDC1(%[ftmp4], %[src], 0x01) \ > >>> - MMI_ULDC1(%[ftmp5], %[src], 0x02) \ > >>> - MMI_ULDC1(%[ftmp6], %[src], 0x03) \ > >>> + MMI_ULWC1(%[ftmp2], %[src], 0x00) \ > >>> + MMI_ULWC1(%[ftmp3], %[src], 0x01) \ > >>> + MMI_ULWC1(%[ftmp4], %[src], 0x02) \ > >>> + MMI_ULWC1(%[ftmp5], %[src], 0x03) \ > >>> "punpcklbh %[ftmp2], %[ftmp2], %[ftmp0] \n\t" \ > >>> "pmullh %[ftmp2], %[ftmp2], %[ftmp1] \n\t" \ > >>> "punpcklbh %[ftmp3], %[ftmp3], %[ftmp0] \n\t" \ > >>> @@ -707,7 +707,7 @@ void ff_hevc_put_hevc_epel_bi_hv##w##_8_mmi(uint8= _t *_dst, \ > >>> "paddh %[ftmp2], %[ftmp2], %[ftmp3] \n\t" \ > >>> "paddh %[ftmp4], %[ftmp4], %[ftmp5] \n\t" \ > >>> "paddh %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \ > >>> - MMI_ULDC1(%[ftmp2], %[tmp], 0x00) \ > >>> + MMI_USDC1(%[ftmp2], %[tmp], 0x00) \ > >>> \ > >>> "daddi %[x], %[x], -0x01 \n\t" \ > >>> PTR_ADDIU "%[src], %[src], 0x04 \n\t" \ > >>> @@ -773,7 +773,7 @@ void ff_hevc_put_hevc_epel_bi_hv##w##_8_mmi(uint8= _t *_dst, \ > >>> "paddw %[ftmp5], %[ftmp5], %[ftmp6] \n\t" \ > >>> "psraw %[ftmp5], %[ftmp5], %[ftmp0] \n\t" \ > >>> "packsswh %[ftmp3], %[ftmp3], %[ftmp5] \n\t" \ > >>> - MMI_ULDC1(%[ftmp4], %[tmp], 0x02) \ > >>> + MMI_ULDC1(%[ftmp4], %[src2], 0x00) \ > >>> "li %[rtmp0], 0x10 \n\t" \ > >>> "dmtc1 %[rtmp0], %[ftmp8] \n\t" \ > >>> "punpcklhw %[ftmp5], %[ftmp2], %[ftmp3] \n\t" \ > >>> --=20 > >>> 2.25.1 > >>=20 > >> Sorry, I must use e-mail client because our e-mail server is Exchange = not SMTP. > >> The patch system seems cannot process UTF-8 Chinese characters correct= ly. > >> I try sending it as attachment again. > >>=20 > > Thank you for fixing this bug. > > LGTM. > >=20 >=20 > Hi, Michael >=20 > Could you please help to merge this Fix. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein --TKxMeUgs2YHnbgRP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYxkflwAKCRBhHseHBAsP q2uuAJ9r8TTHDn1hesKyZKY8H8BYvEKk6QCdH465Z6R5xg/tdB35wv+0oVeEZvo= =lMgk -----END PGP SIGNATURE----- --TKxMeUgs2YHnbgRP-- --===============0773584291783051946== 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". --===============0773584291783051946==--