Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8438b3f0
Commit
8438b3f0
authored
Dec 12, 2013
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aarch64: h264 idct NEON assembler optimizations
Ported from ARMv7 NEON.
parent
71617884
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
536 additions
and
0 deletions
+536
-0
Makefile
libavcodec/aarch64/Makefile
+2
-0
h264dsp_init_aarch64.c
libavcodec/aarch64/h264dsp_init_aarch64.c
+62
-0
h264idct_neon.S
libavcodec/aarch64/h264idct_neon.S
+408
-0
neon.S
libavcodec/aarch64/neon.S
+61
-0
h264dsp.c
libavcodec/h264dsp.c
+1
-0
h264dsp.h
libavcodec/h264dsp.h
+2
-0
No files found.
libavcodec/aarch64/Makefile
View file @
8438b3f0
OBJS-$(CONFIG_H264CHROMA)
+=
aarch64/h264chroma_init_aarch64.o
OBJS-$(CONFIG_H264DSP)
+=
aarch64/h264dsp_init_aarch64.o
OBJS-$(CONFIG_RV40_DECODER)
+=
aarch64/rv40dsp_init_aarch64.o
OBJS-$(CONFIG_VC1_DECODER)
+=
aarch64/vc1dsp_init_aarch64.o
NEON-OBJS-$(CONFIG_H264CHROMA)
+=
aarch64/h264cmc_neon.o
NEON-OBJS-$(CONFIG_H264DSP)
+=
aarch64/h264idct_neon.o
libavcodec/aarch64/h264dsp_init_aarch64.c
0 → 100644
View file @
8438b3f0
/*
* Copyright (c) 2010 Mans Rullgard <mans@mansr.com>
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/aarch64/cpu.h"
#include "libavcodec/h264dsp.h"
void
ff_h264_idct_add_neon
(
uint8_t
*
dst
,
int16_t
*
block
,
int
stride
);
void
ff_h264_idct_dc_add_neon
(
uint8_t
*
dst
,
int16_t
*
block
,
int
stride
);
void
ff_h264_idct_add16_neon
(
uint8_t
*
dst
,
const
int
*
block_offset
,
int16_t
*
block
,
int
stride
,
const
uint8_t
nnzc
[
6
*
8
]);
void
ff_h264_idct_add16intra_neon
(
uint8_t
*
dst
,
const
int
*
block_offset
,
int16_t
*
block
,
int
stride
,
const
uint8_t
nnzc
[
6
*
8
]);
void
ff_h264_idct_add8_neon
(
uint8_t
**
dest
,
const
int
*
block_offset
,
int16_t
*
block
,
int
stride
,
const
uint8_t
nnzc
[
6
*
8
]);
void
ff_h264_idct8_add_neon
(
uint8_t
*
dst
,
int16_t
*
block
,
int
stride
);
void
ff_h264_idct8_dc_add_neon
(
uint8_t
*
dst
,
int16_t
*
block
,
int
stride
);
void
ff_h264_idct8_add4_neon
(
uint8_t
*
dst
,
const
int
*
block_offset
,
int16_t
*
block
,
int
stride
,
const
uint8_t
nnzc
[
6
*
8
]);
av_cold
void
ff_h264dsp_init_aarch64
(
H264DSPContext
*
c
,
const
int
bit_depth
,
const
int
chroma_format_idc
)
{
int
cpu_flags
=
av_get_cpu_flags
();
if
(
have_neon
(
cpu_flags
)
&&
bit_depth
==
8
)
{
c
->
h264_idct_add
=
ff_h264_idct_add_neon
;
c
->
h264_idct_dc_add
=
ff_h264_idct_dc_add_neon
;
c
->
h264_idct_add16
=
ff_h264_idct_add16_neon
;
c
->
h264_idct_add16intra
=
ff_h264_idct_add16intra_neon
;
if
(
chroma_format_idc
<=
1
)
c
->
h264_idct_add8
=
ff_h264_idct_add8_neon
;
c
->
h264_idct8_add
=
ff_h264_idct8_add_neon
;
c
->
h264_idct8_dc_add
=
ff_h264_idct8_dc_add_neon
;
c
->
h264_idct8_add4
=
ff_h264_idct8_add4_neon
;
}
}
libavcodec/aarch64/h264idct_neon.S
0 → 100644
View file @
8438b3f0
This diff is collapsed.
Click to expand it.
libavcodec/aarch64/neon.S
0 → 100644
View file @
8438b3f0
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
.macro transpose_4x4H r0, r1, r2, r3, r4, r5, r6, r7
trn1 \r4\().4H, \r0\().4H, \r1\().4H
trn2 \r5\().4H, \r0\().4H, \r1\().4H
trn1 \r7\().4H, \r3\().4H, \r2\().4H
trn2 \r6\().4H, \r3\().4H, \r2\().4H
trn1 \r0\().2S, \r4\().2S, \r7\().2S
trn2 \r3\().2S, \r4\().2S, \r7\().2S
trn1 \r1\().2S, \r5\().2S, \r6\().2S
trn2 \r2\().2S, \r5\().2S, \r6\().2S
.endm
.macro transpose_8x8H r0, r1, r2, r3, r4, r5, r6, r7, r8, r9
trn1 \r8\().8H, \r0\().8H, \r1\().8H
trn2 \r9\().8H, \r0\().8H, \r1\().8H
trn1 \r1\().8H, \r2\().8H, \r3\().8H
trn2 \r3\().8H, \r2\().8H, \r3\().8H
trn1 \r0\().8H, \r4\().8H, \r5\().8H
trn2 \r5\().8H, \r4\().8H, \r5\().8H
trn1 \r2\().8H, \r6\().8H, \r7\().8H
trn2 \r7\().8H, \r6\().8H, \r7\().8H
trn1 \r4\().4S, \r0\().4S, \r2\().4S
trn2 \r2\().4S, \r0\().4S, \r2\().4S
trn1 \r6\().4S, \r5\().4S, \r7\().4S
trn2 \r7\().4S, \r5\().4S, \r7\().4S
trn1 \r5\().4S, \r9\().4S, \r3\().4S
trn2 \r9\().4S, \r9\().4S, \r3\().4S
trn1 \r3\().4S, \r8\().4S, \r1\().4S
trn2 \r8\().4S, \r8\().4S, \r1\().4S
trn1 \r0\().2D, \r3\().2D, \r4\().2D
trn2 \r4\().2D, \r3\().2D, \r4\().2D
trn1 \r1\().2D, \r5\().2D, \r6\().2D
trn2 \r5\().2D, \r5\().2D, \r6\().2D
trn2 \r6\().2D, \r8\().2D, \r2\().2D
trn1 \r2\().2D, \r8\().2D, \r2\().2D
trn1 \r3\().2D, \r9\().2D, \r7\().2D
trn2 \r7\().2D, \r9\().2D, \r7\().2D
.endm
libavcodec/h264dsp.c
View file @
8438b3f0
...
...
@@ -163,6 +163,7 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
}
c
->
h264_find_start_code_candidate
=
h264_find_start_code_candidate_c
;
if
(
ARCH_AARCH64
)
ff_h264dsp_init_aarch64
(
c
,
bit_depth
,
chroma_format_idc
);
if
(
ARCH_ARM
)
ff_h264dsp_init_arm
(
c
,
bit_depth
,
chroma_format_idc
);
if
(
ARCH_PPC
)
ff_h264dsp_init_ppc
(
c
,
bit_depth
,
chroma_format_idc
);
if
(
ARCH_X86
)
ff_h264dsp_init_x86
(
c
,
bit_depth
,
chroma_format_idc
);
...
...
libavcodec/h264dsp.h
View file @
8438b3f0
...
...
@@ -118,6 +118,8 @@ typedef struct H264DSPContext {
void
ff_h264dsp_init
(
H264DSPContext
*
c
,
const
int
bit_depth
,
const
int
chroma_format_idc
);
void
ff_h264dsp_init_aarch64
(
H264DSPContext
*
c
,
const
int
bit_depth
,
const
int
chroma_format_idc
);
void
ff_h264dsp_init_arm
(
H264DSPContext
*
c
,
const
int
bit_depth
,
const
int
chroma_format_idc
);
void
ff_h264dsp_init_ppc
(
H264DSPContext
*
c
,
const
int
bit_depth
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment