Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e7078e84
Commit
e7078e84
authored
Jul 24, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevcdsp: add x86 SIMD for MC
parent
0cef06df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
11 deletions
+37
-11
hevc.c
libavcodec/hevc.c
+3
-3
hevc.h
libavcodec/hevc.h
+1
-1
hevcdsp.c
libavcodec/hevcdsp.c
+23
-1
hevcdsp.h
libavcodec/hevcdsp.h
+4
-1
hevcdsp_template.c
libavcodec/hevcdsp_template.c
+4
-4
Makefile
libavcodec/x86/Makefile
+2
-1
hevc_mc.asm
libavcodec/x86/hevc_mc.asm
+0
-0
hevcdsp_init.c
libavcodec/x86/hevcdsp_init.c
+0
-0
No files found.
libavcodec/hevc.c
View file @
e7078e84
...
...
@@ -38,9 +38,9 @@
#include "golomb.h"
#include "hevc.h"
const
uint8_t
ff_hevc_qpel_extra_before
[
4
]
=
{
0
,
3
,
3
,
2
};
const
uint8_t
ff_hevc_qpel_extra_after
[
4
]
=
{
0
,
3
,
4
,
4
};
const
uint8_t
ff_hevc_qpel_extra
[
4
]
=
{
0
,
6
,
7
,
6
};
const
uint8_t
ff_hevc_qpel_extra_before
[
4
]
=
{
0
,
3
,
3
,
3
};
const
uint8_t
ff_hevc_qpel_extra_after
[
4
]
=
{
0
,
4
,
4
,
4
};
const
uint8_t
ff_hevc_qpel_extra
[
4
]
=
{
0
,
7
,
7
,
7
};
static
const
uint8_t
scan_1x1
[
1
]
=
{
0
};
...
...
libavcodec/hevc.h
View file @
e7078e84
...
...
@@ -740,7 +740,7 @@ typedef struct HEVCPredContext {
}
HEVCPredContext
;
typedef
struct
HEVCLocalContext
{
DECLARE_ALIGNED
(
16
,
int16_t
,
mc_buffer
[(
MAX_PB_SIZE
+
7
)
*
MAX_PB_SIZE
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
mc_buffer
[(
MAX_PB_SIZE
+
24
)
*
MAX_PB_SIZE
]);
uint8_t
cabac_state
[
HEVC_CONTEXTS
];
uint8_t
first_qp_group
;
...
...
libavcodec/hevcdsp.c
View file @
e7078e84
...
...
@@ -89,7 +89,7 @@ static const int8_t transform[32][32] = {
90
,
-
90
,
88
,
-
85
,
82
,
-
78
,
73
,
-
67
,
61
,
-
54
,
46
,
-
38
,
31
,
-
22
,
13
,
-
4
},
};
DECLARE_ALIGNED
(
16
,
const
int
8_t
,
ff_hevc_epel_filter
s
[
7
][
16
])
=
{
DECLARE_ALIGNED
(
16
,
const
int
16_t
,
ff_hevc_epel_coeff
s
[
7
][
16
])
=
{
{
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
},
{
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
},
{
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
},
...
...
@@ -99,6 +99,28 @@ DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_filters[7][16]) = {
{
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
},
};
DECLARE_ALIGNED
(
16
,
const
int8_t
,
ff_hevc_epel_coeffs8
[
7
][
16
])
=
{
{
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
,
-
2
,
58
,
10
,
-
2
},
{
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
,
-
4
,
54
,
16
,
-
2
},
{
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
,
-
6
,
46
,
28
,
-
4
},
{
-
4
,
36
,
36
,
-
4
,
-
4
,
36
,
36
,
-
4
,
-
4
,
36
,
36
,
-
4
,
-
4
,
36
,
36
,
-
4
},
{
-
4
,
28
,
46
,
-
6
,
-
4
,
28
,
46
,
-
6
,
-
4
,
28
,
46
,
-
6
,
-
4
,
28
,
46
,
-
6
},
{
-
2
,
16
,
54
,
-
4
,
-
2
,
16
,
54
,
-
4
,
-
2
,
16
,
54
,
-
4
,
-
2
,
16
,
54
,
-
4
},
{
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
,
-
2
,
10
,
58
,
-
2
},
};
DECLARE_ALIGNED
(
16
,
const
int16_t
,
ff_hevc_qpel_coeffs
[
3
][
8
])
=
{
{
-
1
,
4
,
-
10
,
58
,
17
,
-
5
,
1
,
0
},
{
-
1
,
4
,
-
11
,
40
,
40
,
-
11
,
4
,
-
1
},
{
0
,
1
,
-
5
,
17
,
58
,
-
10
,
4
,
-
1
},
};
DECLARE_ALIGNED
(
16
,
const
int8_t
,
ff_hevc_qpel_coeffs8
[
3
][
16
])
=
{
{
-
1
,
4
,
-
10
,
58
,
17
,
-
5
,
1
,
0
,
-
1
,
4
,
-
10
,
58
,
17
,
-
5
,
1
,
0
},
{
-
1
,
4
,
-
11
,
40
,
40
,
-
11
,
4
,
-
1
,
-
1
,
4
,
-
11
,
40
,
40
,
-
11
,
4
,
-
1
},
{
0
,
1
,
-
5
,
17
,
58
,
-
10
,
4
,
-
1
,
0
,
1
,
-
5
,
17
,
58
,
-
10
,
4
,
-
1
},
};
#define BIT_DEPTH 8
#include "hevcdsp_template.c"
#undef BIT_DEPTH
...
...
libavcodec/hevcdsp.h
View file @
e7078e84
...
...
@@ -118,6 +118,9 @@ void ff_hevc_dsp_init(HEVCDSPContext *hpc, int bit_depth);
void
ff_hevc_dsp_init_x86
(
HEVCDSPContext
*
c
,
const
int
bit_depth
);
extern
const
int8_t
ff_hevc_epel_filters
[
7
][
16
];
extern
const
int16_t
ff_hevc_epel_coeffs
[
7
][
16
];
extern
const
int8_t
ff_hevc_epel_coeffs8
[
7
][
16
];
extern
const
int16_t
ff_hevc_qpel_coeffs
[
3
][
8
];
extern
const
int8_t
ff_hevc_qpel_coeffs8
[
3
][
16
];
#endif
/* AVCODEC_HEVCDSP_H */
libavcodec/hevcdsp_template.c
View file @
e7078e84
...
...
@@ -1018,7 +1018,7 @@ static inline void FUNC(put_hevc_epel_h)(int16_t *dst, ptrdiff_t dststride,
int
x
,
y
;
pixel
*
src
=
(
pixel
*
)
_src
;
ptrdiff_t
srcstride
=
_srcstride
/
sizeof
(
pixel
);
const
int
8_t
*
filter
=
ff_hevc_epel_filter
s
[
mx
-
1
];
const
int
16_t
*
filter
=
ff_hevc_epel_coeff
s
[
mx
-
1
];
int8_t
filter_0
=
filter
[
0
];
int8_t
filter_1
=
filter
[
1
];
int8_t
filter_2
=
filter
[
2
];
...
...
@@ -1040,7 +1040,7 @@ static inline void FUNC(put_hevc_epel_v)(int16_t *dst, ptrdiff_t dststride,
int
x
,
y
;
pixel
*
src
=
(
pixel
*
)
_src
;
ptrdiff_t
srcstride
=
_srcstride
/
sizeof
(
pixel
);
const
int
8_t
*
filter
=
ff_hevc_epel_filter
s
[
my
-
1
];
const
int
16_t
*
filter
=
ff_hevc_epel_coeff
s
[
my
-
1
];
int8_t
filter_0
=
filter
[
0
];
int8_t
filter_1
=
filter
[
1
];
int8_t
filter_2
=
filter
[
2
];
...
...
@@ -1063,8 +1063,8 @@ static inline void FUNC(put_hevc_epel_hv)(int16_t *dst, ptrdiff_t dststride,
int
x
,
y
;
pixel
*
src
=
(
pixel
*
)
_src
;
ptrdiff_t
srcstride
=
_srcstride
/
sizeof
(
pixel
);
const
int
8_t
*
filter_h
=
ff_hevc_epel_filter
s
[
mx
-
1
];
const
int
8_t
*
filter_v
=
ff_hevc_epel_filter
s
[
my
-
1
];
const
int
16_t
*
filter_h
=
ff_hevc_epel_coeff
s
[
mx
-
1
];
const
int
16_t
*
filter_v
=
ff_hevc_epel_coeff
s
[
my
-
1
];
int8_t
filter_0
=
filter_h
[
0
];
int8_t
filter_1
=
filter_h
[
1
];
int8_t
filter_2
=
filter_h
[
2
];
...
...
libavcodec/x86/Makefile
View file @
e7078e84
...
...
@@ -113,7 +113,8 @@ YASM-OBJS-$(CONFIG_VP8DSP) += x86/vp8dsp.o \
YASM-OBJS-$(CONFIG_AAC_DECODER)
+=
x86/sbrdsp.o
YASM-OBJS-$(CONFIG_APE_DECODER)
+=
x86/apedsp.o
YASM-OBJS-$(CONFIG_DCA_DECODER)
+=
x86/dcadsp.o
YASM-OBJS-$(CONFIG_HEVC_DECODER)
+=
x86/hevc_deblock.o
YASM-OBJS-$(CONFIG_HEVC_DECODER)
+=
x86/hevc_deblock.o
\
x86/hevc_mc.o
YASM-OBJS-$(CONFIG_PNG_DECODER)
+=
x86/pngdsp.o
YASM-OBJS-$(CONFIG_PRORES_DECODER)
+=
x86/proresdsp.o
YASM-OBJS-$(CONFIG_RV40_DECODER)
+=
x86/rv40dsp.o
...
...
libavcodec/x86/hevc_mc.asm
0 → 100644
View file @
e7078e84
This diff is collapsed.
Click to expand it.
libavcodec/x86/hevcdsp_init.c
View file @
e7078e84
This diff is collapsed.
Click to expand it.
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