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
6ab4812f
Commit
6ab4812f
authored
Dec 30, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_cropdetect: support 9-16bit planar formats
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5c7227bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
vf_cropdetect.c
libavfilter/vf_cropdetect.c
+19
-0
No files found.
libavfilter/vf_cropdetect.c
View file @
6ab4812f
...
...
@@ -51,6 +51,11 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_YUV410P
,
AV_PIX_FMT_YUV420P9
,
AV_PIX_FMT_YUV422P9
,
AV_PIX_FMT_YUV444P9
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
AV_PIX_FMT_YUV444P10
,
AV_PIX_FMT_YUV420P12
,
AV_PIX_FMT_YUV422P12
,
AV_PIX_FMT_YUV444P12
,
AV_PIX_FMT_YUV420P14
,
AV_PIX_FMT_YUV422P14
,
AV_PIX_FMT_YUV444P14
,
AV_PIX_FMT_YUV420P16
,
AV_PIX_FMT_YUV422P16
,
AV_PIX_FMT_YUV444P16
,
AV_PIX_FMT_NV12
,
AV_PIX_FMT_NV21
,
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_RGBA
,
AV_PIX_FMT_BGRA
,
...
...
@@ -65,6 +70,7 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
{
int
total
=
0
;
int
div
=
len
;
const
uint16_t
*
src16
=
(
const
uint16_t
*
)
src
;
switch
(
bpp
)
{
case
1
:
...
...
@@ -79,6 +85,19 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
src
+=
stride
;
}
break
;
case
2
:
stride
>>=
1
;
while
(
len
>=
8
)
{
total
+=
src16
[
0
]
+
src16
[
stride
]
+
src16
[
2
*
stride
]
+
src16
[
3
*
stride
]
+
src16
[
4
*
stride
]
+
src16
[
5
*
stride
]
+
src16
[
6
*
stride
]
+
src16
[
7
*
stride
];
src
+=
8
*
stride
;
len
-=
8
;
}
while
(
--
len
>=
0
)
{
total
+=
src16
[
0
];
src
+=
stride
;
}
break
;
case
3
:
case
4
:
while
(
len
>=
4
)
{
...
...
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