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
2b5b1e1e
Commit
2b5b1e1e
authored
Sep 27, 2016
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: Rename is9_OR_10 to match what it does
It is used to select functions that work with 9-15bits.
parent
e87a501e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
output.c
libswscale/output.c
+1
-1
swscale_altivec.c
libswscale/ppc/swscale_altivec.c
+1
-1
swscale.c
libswscale/swscale.c
+2
-2
swscale_internal.h
libswscale/swscale_internal.h
+1
-1
swscale_unscaled.c
libswscale/swscale_unscaled.c
+4
-4
swscale_template.c
libswscale/x86/swscale_template.c
+1
-1
No files found.
libswscale/output.c
View file @
2b5b1e1e
...
...
@@ -1364,7 +1364,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
if
(
is16BPS
(
dstFormat
))
{
*
yuv2planeX
=
isBE
(
dstFormat
)
?
yuv2planeX_16BE_c
:
yuv2planeX_16LE_c
;
*
yuv2plane1
=
isBE
(
dstFormat
)
?
yuv2plane1_16BE_c
:
yuv2plane1_16LE_c
;
}
else
if
(
is9_
OR_10
BPS
(
dstFormat
))
{
}
else
if
(
is9_
15
BPS
(
dstFormat
))
{
if
(
desc
->
comp
[
0
].
depth
==
9
)
{
*
yuv2planeX
=
isBE
(
dstFormat
)
?
yuv2planeX_9BE_c
:
yuv2planeX_9LE_c
;
*
yuv2plane1
=
isBE
(
dstFormat
)
?
yuv2plane1_9BE_c
:
yuv2plane1_9LE_c
;
...
...
libswscale/ppc/swscale_altivec.c
View file @
2b5b1e1e
...
...
@@ -298,7 +298,7 @@ av_cold void ff_sws_init_swscale_ppc(SwsContext *c)
if
(
c
->
srcBpc
==
8
&&
c
->
dstBpc
<=
10
)
{
c
->
hyScale
=
c
->
hcScale
=
hScale_altivec_real
;
}
if
(
!
is16BPS
(
dstFormat
)
&&
!
is9_
OR_10
BPS
(
dstFormat
)
&&
if
(
!
is16BPS
(
dstFormat
)
&&
!
is9_
15
BPS
(
dstFormat
)
&&
dstFormat
!=
AV_PIX_FMT_NV12
&&
dstFormat
!=
AV_PIX_FMT_NV21
&&
!
c
->
alpPixBuf
)
{
c
->
yuv2planeX
=
yuv2planeX_altivec
;
...
...
libswscale/swscale.c
View file @
2b5b1e1e
...
...
@@ -386,7 +386,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
yuv2anyX_fn
yuv2anyX
=
c
->
yuv2anyX
;
const
int
chrSrcSliceY
=
srcSliceY
>>
c
->
chrSrcVSubSample
;
const
int
chrSrcSliceH
=
AV_CEIL_RSHIFT
(
srcSliceH
,
c
->
chrSrcVSubSample
);
int
should_dither
=
is9_
OR_10
BPS
(
c
->
srcFormat
)
||
int
should_dither
=
is9_
15
BPS
(
c
->
srcFormat
)
||
is16BPS
(
c
->
srcFormat
);
int
lastDstY
;
...
...
@@ -696,7 +696,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
if
(
is16BPS
(
c
->
dstFormat
))
length
*=
2
;
if
(
is9_
OR_10
BPS
(
dstFormat
))
{
if
(
is9_
15
BPS
(
dstFormat
))
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
dstFormat
);
fill_plane9or10
(
dst
[
3
],
dstStride
[
3
],
length
,
height
,
lastDstY
,
255
,
desc
->
comp
[
3
].
depth
,
isBE
(
dstFormat
));
...
...
libswscale/swscale_internal.h
View file @
2b5b1e1e
...
...
@@ -565,7 +565,7 @@ static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
return
desc
->
comp
[
0
].
depth
==
16
;
}
static
av_always_inline
int
is9_
OR_10
BPS
(
enum
AVPixelFormat
pix_fmt
)
static
av_always_inline
int
is9_
15
BPS
(
enum
AVPixelFormat
pix_fmt
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
av_assert0
(
desc
);
...
...
libswscale/swscale_unscaled.c
View file @
2b5b1e1e
...
...
@@ -813,7 +813,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
int
val
=
(
plane
==
3
)
?
255
:
128
;
if
(
is16BPS
(
c
->
dstFormat
))
length
*=
2
;
if
(
is9_
OR_10
BPS
(
c
->
dstFormat
))
{
if
(
is9_
15
BPS
(
c
->
dstFormat
))
{
fill_plane9or10
(
dst
[
plane
],
dstStride
[
plane
],
length
,
height
,
y
,
val
,
desc_dst
->
comp
[
plane
].
depth
,
...
...
@@ -822,7 +822,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
fillPlane
(
dst
[
plane
],
dstStride
[
plane
],
length
,
height
,
y
,
val
);
}
else
{
if
(
is9_
OR_10
BPS
(
c
->
srcFormat
))
{
if
(
is9_
15
BPS
(
c
->
srcFormat
))
{
const
int
src_depth
=
desc_src
->
comp
[
plane
].
depth
;
const
int
dst_depth
=
desc_dst
->
comp
[
plane
].
depth
;
const
uint16_t
*
srcPtr2
=
(
const
uint16_t
*
)
srcPtr
;
...
...
@@ -862,7 +862,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
COPY9_OR_10TO16
(
AV_RL16
,
AV_WL16
);
}
}
}
else
if
(
is9_
OR_10
BPS
(
c
->
dstFormat
))
{
}
else
if
(
is9_
15
BPS
(
c
->
dstFormat
))
{
uint16_t
*
dstPtr2
=
(
uint16_t
*
)
dstPtr
;
#define COPY9_OR_10TO9_OR_10(loop) \
for (i = 0; i < height; i++) { \
...
...
@@ -914,7 +914,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
COPY9_OR_10TO8
(
AV_RL16
);
}
}
}
else
if
(
is9_
OR_10
BPS
(
c
->
dstFormat
))
{
}
else
if
(
is9_
15
BPS
(
c
->
dstFormat
))
{
const
int
dst_depth
=
desc_dst
->
comp
[
plane
].
depth
;
uint16_t
*
dstPtr2
=
(
uint16_t
*
)
dstPtr
;
...
...
libswscale/x86/swscale_template.c
View file @
2b5b1e1e
...
...
@@ -1564,7 +1564,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c)
{
enum
AVPixelFormat
dstFormat
=
c
->
dstFormat
;
if
(
!
is16BPS
(
dstFormat
)
&&
!
is9_
OR_10
BPS
(
dstFormat
)
&&
if
(
!
is16BPS
(
dstFormat
)
&&
!
is9_
15
BPS
(
dstFormat
)
&&
dstFormat
!=
AV_PIX_FMT_NV12
&&
dstFormat
!=
AV_PIX_FMT_NV21
)
{
if
(
!
(
c
->
flags
&
SWS_BITEXACT
))
{
if
(
c
->
flags
&
SWS_ACCURATE_RND
)
{
...
...
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