* [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
@ 2024-02-11 21:24 Kieran Kunhya
2024-02-11 21:36 ` James Almer
0 siblings, 1 reply; 7+ messages in thread
From: Kieran Kunhya @ 2024-02-11 21:24 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 50 bytes --]
$subj, now with forward declaration also removed.
[-- Attachment #2: 0001-h264_intrapred-Remove-ff_pred16x16_horizontal_8_mmxe.patch --]
[-- Type: application/octet-stream, Size: 1961 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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
2024-02-11 21:24 [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext Kieran Kunhya
@ 2024-02-11 21:36 ` James Almer
2024-02-11 22:24 ` Kieran Kunhya
2024-02-11 22:34 ` Andreas Rheinhardt
0 siblings, 2 replies; 7+ messages in thread
From: James Almer @ 2024-02-11 21:36 UTC (permalink / raw)
To: ffmpeg-devel
[-- Attachment #1: Type: text/plain, Size: 267 bytes --]
On 2/11/2024 6:24 PM, Kieran Kunhya wrote:
> $subj, now with forward declaration also removed.
This function is trivial to convert to SSE2, so better do that than
removing it. Attached.
If other functions are harder to port to SSE2, then sure, they can be
removed.
[-- Attachment #2: 0001-x86-h264_intrapred-convert-ff_pred16x16_horizontal_8.patch --]
[-- Type: text/plain, Size: 2372 bytes --]
From fdf1db323c1209fcb927f7df0d041d78f6214bf7 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Sun, 11 Feb 2024 18:35:31 -0300
Subject: [PATCH] x86/h264_intrapred: convert ff_pred16x16_horizontal_8_mmxext
to sse2
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/x86/h264_intrapred.asm | 4 +---
libavcodec/x86/h264_intrapred_init.c | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
index 8a38ba2bb5..49a63f900e 100644
--- a/libavcodec/x86/h264_intrapred.asm
+++ b/libavcodec/x86/h264_intrapred.asm
@@ -86,8 +86,6 @@ cglobal pred16x16_horizontal_8, 2,3
punpcklbw m1, m1
SPLATW m0, m0, 3
SPLATW m1, m1, 3
- mova [r0+r1*0+8], m0
- mova [r0+r1*1+8], m1
%endif
mova [r0+r1*0], m0
@@ -98,7 +96,7 @@ cglobal pred16x16_horizontal_8, 2,3
RET
%endmacro
-INIT_MMX mmxext
+INIT_XMM sse2
PRED16x16_H
INIT_XMM ssse3
PRED16x16_H
diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
index ee46927a24..06cb0ea8fe 100644
--- a/libavcodec/x86/h264_intrapred_init.c
+++ b/libavcodec/x86/h264_intrapred_init.c
@@ -100,7 +100,7 @@ PRED16x16(horizontal, 10, sse2)
/* 8-bit versions */
PRED16x16(vertical, 8, sse)
-PRED16x16(horizontal, 8, mmxext)
+PRED16x16(horizontal, 8, sse2)
PRED16x16(horizontal, 8, ssse3)
PRED16x16(dc, 8, sse2)
PRED16x16(dc, 8, ssse3)
@@ -170,7 +170,6 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
}
if (EXTERNAL_MMXEXT(cpu_flags)) {
- h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext;
if (chroma_format_idc <= 1)
h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext;
h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext;
@@ -210,6 +209,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
}
if (EXTERNAL_SSE2(cpu_flags)) {
+ h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_sse2;
h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_sse2;
h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_sse2;
h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_sse2;
--
2.43.0
[-- 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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
2024-02-11 21:36 ` James Almer
@ 2024-02-11 22:24 ` Kieran Kunhya
2024-02-11 22:34 ` Andreas Rheinhardt
1 sibling, 0 replies; 7+ messages in thread
From: Kieran Kunhya @ 2024-02-11 22:24 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Sun, 11 Feb 2024 at 21:36, James Almer <jamrial@gmail.com> wrote:
> On 2/11/2024 6:24 PM, Kieran Kunhya wrote:
> > $subj, now with forward declaration also removed.
>
> This function is trivial to convert to SSE2, so better do that than
> removing it. Attached.
> If other functions are harder to port to SSE2, then sure, they can be
> removed._______________________________________________
>
>
Thanks, applied. One down, couple dozen to go.
Kieran
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
2024-02-11 21:36 ` James Almer
2024-02-11 22:24 ` Kieran Kunhya
@ 2024-02-11 22:34 ` Andreas Rheinhardt
2024-02-11 22:42 ` Kieran Kunhya
2024-02-11 22:47 ` James Almer
1 sibling, 2 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2024-02-11 22:34 UTC (permalink / raw)
To: ffmpeg-devel
James Almer:
> On 2/11/2024 6:24 PM, Kieran Kunhya wrote:
>> $subj, now with forward declaration also removed.
>
> This function is trivial to convert to SSE2, so better do that than
> removing it. Attached.
> If other functions are harder to port to SSE2, then sure, they can be
> removed.
>
Benchmarks?
- Andreas
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
2024-02-11 22:34 ` Andreas Rheinhardt
@ 2024-02-11 22:42 ` Kieran Kunhya
2024-02-11 22:47 ` James Almer
1 sibling, 0 replies; 7+ messages in thread
From: Kieran Kunhya @ 2024-02-11 22:42 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Sun, 11 Feb 2024 at 22:33, Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:
> James Almer:
> > On 2/11/2024 6:24 PM, Kieran Kunhya wrote:
> >> $subj, now with forward declaration also removed.
> >
> > This function is trivial to convert to SSE2, so better do that than
> > removing it. Attached.
> > If other functions are harder to port to SSE2, then sure, they can be
> > removed.
> >
>
> Benchmarks?
>
> - Andreas
>
For me on Haswell x64:
pred16x16_horizontal_8_c: 41.5
pred16x16_horizontal_8_sse2: 32.5
pred16x16_horizontal_8_ssse3: 9.0
pred16x16_horizontal_8_c: 43.5
pred16x16_horizontal_8_mmxext: 20.7
pred16x16_horizontal_8_ssse3: 12.2
Kieran
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
2024-02-11 22:34 ` Andreas Rheinhardt
2024-02-11 22:42 ` Kieran Kunhya
@ 2024-02-11 22:47 ` James Almer
1 sibling, 0 replies; 7+ messages in thread
From: James Almer @ 2024-02-11 22:47 UTC (permalink / raw)
To: ffmpeg-devel
On 2/11/2024 7:34 PM, Andreas Rheinhardt wrote:
> James Almer:
>> On 2/11/2024 6:24 PM, Kieran Kunhya wrote:
>>> $subj, now with forward declaration also removed.
>>
>> This function is trivial to convert to SSE2, so better do that than
>> removing it. Attached.
>> If other functions are harder to port to SSE2, then sure, they can be
>> removed.
>>
>
> Benchmarks?
>
> - Andreas
On an Alder Lake i get
pred16x16_horizontal_8_c: 26.5
pred16x16_horizontal_8_mmxext: 24.8
pred16x16_horizontal_8_sse2: 20.0
pred16x16_horizontal_8_ssse3: 12.5
_______________________________________________
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] 7+ messages in thread
* [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext
@ 2024-02-11 21:07 Kieran Kunhya
0 siblings, 0 replies; 7+ messages in thread
From: Kieran Kunhya @ 2024-02-11 21:07 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
$subj
[-- Attachment #2: 0001-h264_intrapred-Remove-ff_pred16x16_horizontal_8_mmxe.patch --]
[-- Type: application/octet-stream, Size: 1740 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] 7+ messages in thread
end of thread, other threads:[~2024-02-11 22:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 21:24 [FFmpeg-devel] [PATCH] h264_intrapred: Remove ff_pred16x16_horizontal_8_mmxext Kieran Kunhya
2024-02-11 21:36 ` James Almer
2024-02-11 22:24 ` Kieran Kunhya
2024-02-11 22:34 ` Andreas Rheinhardt
2024-02-11 22:42 ` Kieran Kunhya
2024-02-11 22:47 ` James Almer
-- strict thread matches above, loose matches on Subject: below --
2024-02-11 21:07 Kieran Kunhya
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