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
df123590
Commit
df123590
authored
Apr 16, 2020
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vf_crop: use ff_formats_pixdesc_filter().
parent
563e1df5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
vf_crop.c
libavfilter/vf_crop.c
+4
-17
No files found.
libavfilter/vf_crop.c
View file @
df123590
...
@@ -94,24 +94,11 @@ typedef struct CropContext {
...
@@ -94,24 +94,11 @@ typedef struct CropContext {
static
int
query_formats
(
AVFilterContext
*
ctx
)
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
{
AVFilterFormats
*
formats
=
NULL
;
AVFilterFormats
*
formats
=
NULL
;
int
fmt
,
ret
;
int
ret
;
for
(
fmt
=
0
;
av_pix_fmt_desc_get
(
fmt
);
fmt
++
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
fmt
);
if
(
desc
->
flags
&
AV_PIX_FMT_FLAG_BITSTREAM
)
continue
;
if
(
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_HWACCEL
))
{
// Not usable if there is any subsampling but the format is
// not planar (e.g. YUYV422).
if
((
desc
->
log2_chroma_w
||
desc
->
log2_chroma_h
)
&&
!
(
desc
->
flags
&
AV_PIX_FMT_FLAG_PLANAR
))
continue
;
}
ret
=
ff_add_format
(
&
formats
,
fmt
);
if
(
ret
<
0
)
return
ret
;
}
ret
=
ff_formats_pixdesc_filter
(
&
formats
,
0
,
AV_PIX_FMT_FLAG_BITSTREAM
|
FF_PIX_FMT_FLAG_SW_FLAT_SUB
);
if
(
ret
<
0
)
return
ret
;
return
ff_set_common_formats
(
ctx
,
formats
);
return
ff_set_common_formats
(
ctx
,
formats
);
}
}
...
...
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