* [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder
@ 2022-08-18 11:01 戚铁铮
0 siblings, 0 replies; 5+ messages in thread
From: 戚铁铮 @ 2022-08-18 11:01 UTC (permalink / raw)
To: ffmpeg-devel
Cc: yinshiyou-hf, 田新超, 张志磊,
chenhao
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.
Signed-off-by: Qi Tiezheng <qitiezheng@360.cn>
---
libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
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 *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], %[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(uint8_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" \
--
2.25.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder
@ 2022-08-18 11:44 戚铁铮
2022-08-18 12:29 ` Shiyou Yin
0 siblings, 1 reply; 5+ messages in thread
From: 戚铁铮 @ 2022-08-18 11:44 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 5213 bytes --]
At 2022/8/18 PM 7:01, "Qi Tiezheng" <qitiezheng@360.cn> wrote:
> 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.
>
> Signed-off-by: Qi Tiezheng <qitiezheng@360.cn>
> ---
> libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> 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 *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], %[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(uint8_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" \
> --
> 2.25.1
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 correctly.
I try sending it as attachment again.
[-- Attachment #2: 0001-avcodec-mips-Fix-MMI-macro-replaces-in-HEVC-Decoder.patch --]
[-- Type: application/octet-stream, Size: 4800 bytes --]
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder
2022-08-18 11:44 戚铁铮
@ 2022-08-18 12:29 ` Shiyou Yin
2022-09-06 11:34 ` Shiyou Yin
0 siblings, 1 reply; 5+ messages in thread
From: Shiyou Yin @ 2022-08-18 12:29 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> 2022年8月18日 19:44,戚铁铮 <qitiezheng@360.cn> 写道:
>
>
> At 2022/8/18 PM 7:01, "Qi Tiezheng" <qitiezheng@360.cn <mailto:qitiezheng@360.cn>> wrote:
>
>> 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.
>>
>> Signed-off-by: Qi Tiezheng <qitiezheng@360.cn>
>> ---
>> libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++--------
>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> 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 *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], %[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(uint8_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" \
>> --
>> 2.25.1
>
> 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 correctly.
> I try sending it as attachment again.
>
Thank you for fixing this bug.
LGTM.
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder
2022-08-18 12:29 ` Shiyou Yin
@ 2022-09-06 11:34 ` Shiyou Yin
2022-09-07 22:47 ` Michael Niedermayer
0 siblings, 1 reply; 5+ messages in thread
From: Shiyou Yin @ 2022-09-06 11:34 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Michael Niedermayer
> 2022年8月18日 20:29,Shiyou Yin <yinshiyou-hf@loongson.cn> 写道:
>
>
>
>> 2022年8月18日 19:44,戚铁铮 <qitiezheng@360.cn <mailto:qitiezheng@360.cn>> 写道:
>>
>>
>> At 2022/8/18 PM 7:01, "Qi Tiezheng" <qitiezheng@360.cn <mailto:qitiezheng@360.cn>> wrote:
>>
>>> 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.
>>>
>>> Signed-off-by: Qi Tiezheng <qitiezheng@360.cn <mailto:qitiezheng@360.cn>>
>>> ---
>>> libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++--------
>>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>>
>>> 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 *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], %[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(uint8_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" \
>>> --
>>> 2.25.1
>>
>> 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 correctly.
>> I try sending it as attachment again.
>>
> Thank you for fixing this bug.
> LGTM.
>
Hi, Michael
Could you please help to merge this Fix.
Thanks,
Shiyou
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder
2022-09-06 11:34 ` Shiyou Yin
@ 2022-09-07 22:47 ` Michael Niedermayer
0 siblings, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2022-09-07 22:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 4088 bytes --]
On Tue, Sep 06, 2022 at 07:34:14PM +0800, Shiyou Yin wrote:
>
>
> > 2022年8月18日 20:29,Shiyou Yin <yinshiyou-hf@loongson.cn> 写道:
> >
> >
> >
> >> 2022年8月18日 19:44,戚铁铮 <qitiezheng@360.cn <mailto:qitiezheng@360.cn>> 写道:
> >>
> >>
> >> At 2022/8/18 PM 7:01, "Qi Tiezheng" <qitiezheng@360.cn <mailto:qitiezheng@360.cn>> wrote:
> >>
> >>> 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.
> >>>
> >>> Signed-off-by: Qi Tiezheng <qitiezheng@360.cn <mailto:qitiezheng@360.cn>>
> >>> ---
> >>> libavcodec/mips/hevcdsp_mmi.c | 16 ++++++++--------
> >>> 1 file changed, 8 insertions(+), 8 deletions(-)
> >>>
> >>> 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 *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], %[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(uint8_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" \
> >>> --
> >>> 2.25.1
> >>
> >> 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 correctly.
> >> I try sending it as attachment again.
> >>
> > Thank you for fixing this bug.
> > LGTM.
> >
>
> Hi, Michael
>
> Could you please help to merge this Fix.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-07 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 11:01 [FFmpeg-devel] [PATCH v2] avcodec/mips: Fix MMI macro replaces in HEVC Decoder 戚铁铮
2022-08-18 11:44 戚铁铮
2022-08-18 12:29 ` Shiyou Yin
2022-09-06 11:34 ` Shiyou Yin
2022-09-07 22:47 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git