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
a6b65011
Commit
a6b65011
authored
Aug 23, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc: cosmetics: Consistently format CPU flag detection invocations
parent
67e6a9f5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
30 deletions
+40
-30
h264chroma_init.c
libavcodec/ppc/h264chroma_init.c
+3
-2
h264dsp.c
libavcodec/ppc/h264dsp.c
+3
-2
h264qpel.c
libavcodec/ppc/h264qpel.c
+3
-2
hpeldsp_altivec.c
libavcodec/ppc/hpeldsp_altivec.c
+14
-13
mpegvideo_altivec.c
libavcodec/ppc/mpegvideo_altivec.c
+3
-2
vorbisdsp_altivec.c
libavcodec/ppc/vorbisdsp_altivec.c
+4
-3
vp3dsp_altivec.c
libavcodec/ppc/vp3dsp_altivec.c
+5
-4
yuv2yuv_altivec.c
libswscale/ppc/yuv2yuv_altivec.c
+5
-2
No files found.
libavcodec/ppc/h264chroma_init.c
View file @
a6b65011
...
...
@@ -53,11 +53,12 @@ av_cold void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth)
#if HAVE_ALTIVEC
const
int
high_bit_depth
=
bit_depth
>
8
;
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
if
(
!
high_bit_depth
)
{
c
->
put_h264_chroma_pixels_tab
[
0
]
=
put_h264_chroma_mc8_altivec
;
c
->
avg_h264_chroma_pixels_tab
[
0
]
=
avg_h264_chroma_mc8_altivec
;
}
}
#endif
/* HAVE_ALTIVEC */
}
libavcodec/ppc/h264dsp.c
View file @
a6b65011
...
...
@@ -745,7 +745,9 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth,
const
int
chroma_format_idc
)
{
#if HAVE_ALTIVEC
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
if
(
bit_depth
==
8
)
{
c
->
h264_idct_add
=
h264_idct_add_altivec
;
if
(
chroma_format_idc
==
1
)
...
...
@@ -764,6 +766,5 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth,
c
->
biweight_h264_pixels_tab
[
0
]
=
biweight_h264_pixels16_altivec
;
c
->
biweight_h264_pixels_tab
[
1
]
=
biweight_h264_pixels8_altivec
;
}
}
#endif
/* HAVE_ALTIVEC */
}
libavcodec/ppc/h264qpel.c
View file @
a6b65011
...
...
@@ -288,7 +288,9 @@ av_cold void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth)
#if HAVE_ALTIVEC
const
int
high_bit_depth
=
bit_depth
>
8
;
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
if
(
!
high_bit_depth
)
{
#define dspfunc(PFX, IDX, NUM) \
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_altivec; \
...
...
@@ -312,6 +314,5 @@ av_cold void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth)
dspfunc
(
avg_h264_qpel
,
0
,
16
);
#undef dspfunc
}
}
#endif
/* HAVE_ALTIVEC */
}
libavcodec/ppc/hpeldsp_altivec.c
View file @
a6b65011
...
...
@@ -449,18 +449,19 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi
av_cold
void
ff_hpeldsp_init_ppc
(
HpelDSPContext
*
c
,
int
flags
)
{
#if HAVE_ALTIVEC
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
c
->
avg_pixels_tab
[
0
][
0
]
=
ff_avg_pixels16_altivec
;
c
->
avg_pixels_tab
[
1
][
0
]
=
avg_pixels8_altivec
;
c
->
avg_pixels_tab
[
1
][
3
]
=
avg_pixels8_xy2_altivec
;
c
->
put_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_altivec
;
c
->
put_pixels_tab
[
1
][
3
]
=
put_pixels8_xy2_altivec
;
c
->
put_pixels_tab
[
0
][
3
]
=
put_pixels16_xy2_altivec
;
c
->
put_no_rnd_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_altivec
;
c
->
put_no_rnd_pixels_tab
[
1
][
3
]
=
put_no_rnd_pixels8_xy2_altivec
;
c
->
put_no_rnd_pixels_tab
[
0
][
3
]
=
put_no_rnd_pixels16_xy2_altivec
;
}
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
c
->
avg_pixels_tab
[
0
][
0
]
=
ff_avg_pixels16_altivec
;
c
->
avg_pixels_tab
[
1
][
0
]
=
avg_pixels8_altivec
;
c
->
avg_pixels_tab
[
1
][
3
]
=
avg_pixels8_xy2_altivec
;
c
->
put_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_altivec
;
c
->
put_pixels_tab
[
1
][
3
]
=
put_pixels8_xy2_altivec
;
c
->
put_pixels_tab
[
0
][
3
]
=
put_pixels16_xy2_altivec
;
c
->
put_no_rnd_pixels_tab
[
0
][
0
]
=
ff_put_pixels16_altivec
;
c
->
put_no_rnd_pixels_tab
[
1
][
3
]
=
put_no_rnd_pixels8_xy2_altivec
;
c
->
put_no_rnd_pixels_tab
[
0
][
3
]
=
put_no_rnd_pixels16_xy2_altivec
;
#endif
/* HAVE_ALTIVEC */
}
libavcodec/ppc/mpegvideo_altivec.c
View file @
a6b65011
...
...
@@ -118,10 +118,11 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s,
av_cold
void
ff_MPV_common_init_ppc
(
MpegEncContext
*
s
)
{
#if HAVE_ALTIVEC
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
if
((
s
->
avctx
->
dct_algo
==
FF_DCT_AUTO
)
||
(
s
->
avctx
->
dct_algo
==
FF_DCT_ALTIVEC
))
{
(
s
->
avctx
->
dct_algo
==
FF_DCT_ALTIVEC
))
{
s
->
dct_unquantize_h263_intra
=
dct_unquantize_h263_altivec
;
s
->
dct_unquantize_h263_inter
=
dct_unquantize_h263_altivec
;
}
...
...
libavcodec/ppc/vorbisdsp_altivec.c
View file @
a6b65011
...
...
@@ -54,8 +54,9 @@ static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
av_cold
void
ff_vorbisdsp_init_ppc
(
VorbisDSPContext
*
c
)
{
#if HAVE_ALTIVEC
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
c
->
vorbis_inverse_coupling
=
vorbis_inverse_coupling_altivec
;
}
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
c
->
vorbis_inverse_coupling
=
vorbis_inverse_coupling_altivec
;
#endif
/* HAVE_ALTIVEC */
}
libavcodec/ppc/vp3dsp_altivec.c
View file @
a6b65011
...
...
@@ -180,9 +180,10 @@ static void vp3_idct_add_altivec(uint8_t *dst, int stride, int16_t block[64])
av_cold
void
ff_vp3dsp_init_ppc
(
VP3DSPContext
*
c
,
int
flags
)
{
#if HAVE_ALTIVEC
if
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
{
c
->
idct_put
=
vp3_idct_put_altivec
;
c
->
idct_add
=
vp3_idct_add_altivec
;
}
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
;
c
->
idct_put
=
vp3_idct_put_altivec
;
c
->
idct_add
=
vp3_idct_add_altivec
;
#endif
}
libswscale/ppc/yuv2yuv_altivec.c
View file @
a6b65011
...
...
@@ -187,8 +187,11 @@ static int yv12touyvy_unscaled_altivec(SwsContext *c, const uint8_t *src[],
av_cold
void
ff_get_unscaled_swscale_ppc
(
SwsContext
*
c
)
{
#if HAVE_ALTIVEC
if
((
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
)
&&
!
(
c
->
srcW
&
15
)
&&
!
(
c
->
flags
&
SWS_BITEXACT
)
&&
c
->
srcFormat
==
AV_PIX_FMT_YUV420P
)
{
if
(
!
(
av_get_cpu_flags
()
&
AV_CPU_FLAG_ALTIVEC
))
return
NULL
;
if
(
!
(
c
->
srcW
&
15
)
&&
!
(
c
->
flags
&
SWS_BITEXACT
)
&&
c
->
srcFormat
==
AV_PIX_FMT_YUV420P
)
{
enum
AVPixelFormat
dstFormat
=
c
->
dstFormat
;
// unscaled YV12 -> packed YUV, we want speed
...
...
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