diff mbox

[FFmpeg-devel,1/8] arm: vp9dsp: Restructure the bpp checks

Message ID 1484775915-25188-1-git-send-email-martin@martin.st
State Accepted
Commit cda9a3e80b74160524ce484c0a984afebbbae71c
Headers show

Commit Message

Martin Storsjö Jan. 18, 2017, 9:45 p.m. UTC
This work is sponsored by, and copyright, Google.

This is more in line with how it will be extended for more bitdepths.
---
 libavcodec/arm/vp9dsp_init_arm.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

Comments

Michael Niedermayer Jan. 19, 2017, 6:48 p.m. UTC | #1
On Wed, Jan 18, 2017 at 11:45:08PM +0200, Martin Storsjö wrote:
> This work is sponsored by, and copyright, Google.
> 
> This is more in line with how it will be extended for more bitdepths.
> ---
>  libavcodec/arm/vp9dsp_init_arm.c | 24 +++++++++---------------
>  1 file changed, 9 insertions(+), 15 deletions(-)

fate passes with this patchset under qemu arm

[...]
Martin Storsjö Jan. 24, 2017, 8:51 p.m. UTC | #2
On Thu, 19 Jan 2017, Michael Niedermayer wrote:

> On Wed, Jan 18, 2017 at 11:45:08PM +0200, Martin Storsjö wrote:
>> This work is sponsored by, and copyright, Google.
>>
>> This is more in line with how it will be extended for more bitdepths.
>> ---
>>  libavcodec/arm/vp9dsp_init_arm.c | 24 +++++++++---------------
>>  1 file changed, 9 insertions(+), 15 deletions(-)
>
> fate passes with this patchset under qemu arm

Pushed, thanks!

// Martin
diff mbox

Patch

diff --git a/libavcodec/arm/vp9dsp_init_arm.c b/libavcodec/arm/vp9dsp_init_arm.c
index 05e50d7..0b76eb1 100644
--- a/libavcodec/arm/vp9dsp_init_arm.c
+++ b/libavcodec/arm/vp9dsp_init_arm.c
@@ -94,13 +94,10 @@  define_8tap_2d_funcs(8)
 define_8tap_2d_funcs(4)
 
 
-static av_cold void vp9dsp_mc_init_arm(VP9DSPContext *dsp, int bpp)
+static av_cold void vp9dsp_mc_init_arm(VP9DSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (bpp != 8)
-        return;
-
     if (have_neon(cpu_flags)) {
 #define init_fpel(idx1, idx2, sz, type)              \
     dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \
@@ -160,13 +157,10 @@  define_itxfm(idct, idct, 32);
 define_itxfm(iwht, iwht, 4);
 
 
-static av_cold void vp9dsp_itxfm_init_arm(VP9DSPContext *dsp, int bpp)
+static av_cold void vp9dsp_itxfm_init_arm(VP9DSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (bpp != 8)
-        return;
-
     if (have_neon(cpu_flags)) {
 #define init_itxfm(tx, sz)                                             \
     dsp->itxfm_add[tx][DCT_DCT]   = ff_vp9_idct_idct_##sz##_add_neon;  \
@@ -218,13 +212,10 @@  lf_mix_fns(4, 8)
 lf_mix_fns(8, 4)
 lf_mix_fns(8, 8)
 
-static av_cold void vp9dsp_loopfilter_init_arm(VP9DSPContext *dsp, int bpp)
+static av_cold void vp9dsp_loopfilter_init_arm(VP9DSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (bpp != 8)
-        return;
-
     if (have_neon(cpu_flags)) {
         dsp->loop_filter_8[0][1] = ff_vp9_loop_filter_v_4_8_neon;
         dsp->loop_filter_8[0][0] = ff_vp9_loop_filter_h_4_8_neon;
@@ -249,7 +240,10 @@  static av_cold void vp9dsp_loopfilter_init_arm(VP9DSPContext *dsp, int bpp)
 
 av_cold void ff_vp9dsp_init_arm(VP9DSPContext *dsp, int bpp)
 {
-    vp9dsp_mc_init_arm(dsp, bpp);
-    vp9dsp_loopfilter_init_arm(dsp, bpp);
-    vp9dsp_itxfm_init_arm(dsp, bpp);
+    if (bpp != 8)
+        return;
+
+    vp9dsp_mc_init_arm(dsp);
+    vp9dsp_loopfilter_init_arm(dsp);
+    vp9dsp_itxfm_init_arm(dsp);
 }