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
ed040f35
Commit
ed040f35
authored
Feb 18, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PPC build.
parent
891b1f15
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
h264_altivec.c
libavcodec/ppc/h264_altivec.c
+0
-6
h264_template_altivec.c
libavcodec/ppc/h264_template_altivec.c
+10
-0
vc1dsp_altivec.c
libavcodec/ppc/vc1dsp_altivec.c
+17
-0
No files found.
libavcodec/ppc/h264_altivec.c
View file @
ed040f35
...
...
@@ -32,7 +32,6 @@
#define OP_U8_ALTIVEC PUT_OP_U8_ALTIVEC
#define PREFIX_h264_chroma_mc8_altivec put_h264_chroma_mc8_altivec
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec put_no_rnd_vc1_chroma_mc8_altivec
#define PREFIX_h264_chroma_mc8_num altivec_put_h264_chroma_mc8_num
#define PREFIX_h264_qpel16_h_lowpass_altivec put_h264_qpel16_h_lowpass_altivec
#define PREFIX_h264_qpel16_h_lowpass_num altivec_put_h264_qpel16_h_lowpass_num
...
...
@@ -43,7 +42,6 @@
#include "h264_template_altivec.c"
#undef OP_U8_ALTIVEC
#undef PREFIX_h264_chroma_mc8_altivec
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
#undef PREFIX_h264_chroma_mc8_num
#undef PREFIX_h264_qpel16_h_lowpass_altivec
#undef PREFIX_h264_qpel16_h_lowpass_num
...
...
@@ -54,7 +52,6 @@
#define OP_U8_ALTIVEC AVG_OP_U8_ALTIVEC
#define PREFIX_h264_chroma_mc8_altivec avg_h264_chroma_mc8_altivec
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec avg_no_rnd_vc1_chroma_mc8_altivec
#define PREFIX_h264_chroma_mc8_num altivec_avg_h264_chroma_mc8_num
#define PREFIX_h264_qpel16_h_lowpass_altivec avg_h264_qpel16_h_lowpass_altivec
#define PREFIX_h264_qpel16_h_lowpass_num altivec_avg_h264_qpel16_h_lowpass_num
...
...
@@ -65,7 +62,6 @@
#include "h264_template_altivec.c"
#undef OP_U8_ALTIVEC
#undef PREFIX_h264_chroma_mc8_altivec
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
#undef PREFIX_h264_chroma_mc8_num
#undef PREFIX_h264_qpel16_h_lowpass_altivec
#undef PREFIX_h264_qpel16_h_lowpass_num
...
...
@@ -973,8 +969,6 @@ void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) {
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
c
->
put_h264_chroma_pixels_tab
[
0
]
=
put_h264_chroma_mc8_altivec
;
c
->
avg_h264_chroma_pixels_tab
[
0
]
=
avg_h264_chroma_mc8_altivec
;
c
->
put_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
put_no_rnd_vc1_chroma_mc8_altivec
;
c
->
avg_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
avg_no_rnd_vc1_chroma_mc8_altivec
;
#define dspfunc(PFX, IDX, NUM) \
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_altivec; \
...
...
libavcodec/ppc/h264_template_altivec.c
View file @
ed040f35
...
...
@@ -75,6 +75,7 @@
#define noop(a) a
#define add28(a) vec_add(v28ss, a)
#ifdef PREFIX_h264_chroma_mc8_altivec
static
void
PREFIX_h264_chroma_mc8_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
stride
,
int
h
,
int
x
,
int
y
)
{
DECLARE_ALIGNED
(
16
,
signed
int
,
ABCD
)[
4
]
=
...
...
@@ -201,8 +202,10 @@ static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
}
}
}
#endif
/* this code assume that stride % 16 == 0 */
#ifdef PREFIX_no_rnd_vc1_chroma_mc8_altivec
static
void
PREFIX_no_rnd_vc1_chroma_mc8_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
stride
,
int
h
,
int
x
,
int
y
)
{
DECLARE_ALIGNED
(
16
,
signed
int
,
ABCD
)[
4
]
=
{((
8
-
x
)
*
(
8
-
y
)),
...
...
@@ -284,12 +287,14 @@ static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, i
}
}
}
#endif
#undef noop
#undef add28
#undef CHROMA_MC8_ALTIVEC_CORE
/* this code assume stride % 16 == 0 */
#ifdef PREFIX_h264_qpel16_h_lowpass_altivec
static
void
PREFIX_h264_qpel16_h_lowpass_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
dstStride
,
int
srcStride
)
{
register
int
i
;
...
...
@@ -427,8 +432,10 @@ static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, i
dst
+=
dstStride
;
}
}
#endif
/* this code assume stride % 16 == 0 */
#ifdef PREFIX_h264_qpel16_v_lowpass_altivec
static
void
PREFIX_h264_qpel16_v_lowpass_altivec
(
uint8_t
*
dst
,
uint8_t
*
src
,
int
dstStride
,
int
srcStride
)
{
register
int
i
;
...
...
@@ -533,8 +540,10 @@ static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, i
dst
+=
dstStride
;
}
}
#endif
/* this code assume stride % 16 == 0 *and* tmp is properly aligned */
#ifdef PREFIX_h264_qpel16_hv_lowpass_altivec
static
void
PREFIX_h264_qpel16_hv_lowpass_altivec
(
uint8_t
*
dst
,
int16_t
*
tmp
,
uint8_t
*
src
,
int
dstStride
,
int
tmpStride
,
int
srcStride
)
{
register
int
i
;
LOAD_ZERO
;
...
...
@@ -765,3 +774,4 @@ static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp,
dst
+=
dstStride
;
}
}
#endif
libavcodec/ppc/vc1dsp_altivec.c
View file @
ed040f35
...
...
@@ -20,6 +20,7 @@
*/
#include "libavcodec/dsputil.h"
#include "libavcodec/vc1dsp.h"
#include "util_altivec.h"
#include "dsputil_altivec.h"
...
...
@@ -321,6 +322,20 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, DCTELEM *block)
ADD
(
dest
,
src3
,
perm1
)
}
#define PUT_OP_U8_ALTIVEC(d, s, dst) d = s
#define AVG_OP_U8_ALTIVEC(d, s, dst) d = vec_avg(dst, s)
#define OP_U8_ALTIVEC PUT_OP_U8_ALTIVEC
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec put_no_rnd_vc1_chroma_mc8_altivec
#include "h264_template_altivec.c"
#undef OP_U8_ALTIVEC
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
#define OP_U8_ALTIVEC AVG_OP_U8_ALTIVEC
#define PREFIX_no_rnd_vc1_chroma_mc8_altivec avg_no_rnd_vc1_chroma_mc8_altivec
#include "h264_template_altivec.c"
#undef OP_U8_ALTIVEC
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
void
ff_vc1dsp_init_altivec
(
VC1DSPContext
*
dsp
)
{
...
...
@@ -329,4 +344,6 @@ void ff_vc1dsp_init_altivec(VC1DSPContext* dsp)
dsp
->
vc1_inv_trans_8x8
=
vc1_inv_trans_8x8_altivec
;
dsp
->
vc1_inv_trans_8x4
=
vc1_inv_trans_8x4_altivec
;
dsp
->
put_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
put_no_rnd_vc1_chroma_mc8_altivec
;
dsp
->
avg_no_rnd_vc1_chroma_pixels_tab
[
0
]
=
avg_no_rnd_vc1_chroma_mc8_altivec
;
}
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