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
b7f1010c
Commit
b7f1010c
authored
Oct 06, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: do not use av_pix_fmt_descriptors directly.
parent
d2fcb356
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
avprobe.c
avprobe.c
+3
-3
cmdutils.c
cmdutils.c
+11
-5
graph2dot.c
tools/graph2dot.c
+2
-2
No files found.
avprobe.c
View file @
b7f1010c
...
...
@@ -584,6 +584,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
const
char
*
profile
;
char
val_str
[
128
];
AVRational
display_aspect_ratio
;
const
AVPixFmtDescriptor
*
desc
;
probe_object_header
(
"stream"
);
...
...
@@ -629,9 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
rational_string
(
val_str
,
sizeof
(
val_str
),
":"
,
&
display_aspect_ratio
));
}
probe_str
(
"pix_fmt"
,
dec_ctx
->
pix_fmt
!=
AV_PIX_FMT_NONE
?
av_pix_fmt_descriptors
[
dec_ctx
->
pix_fmt
].
name
:
"unknown"
);
desc
=
av_pix_fmt_desc_get
(
dec_ctx
->
pix_fmt
);
probe_str
(
"pix_fmt"
,
desc
?
desc
->
name
:
"unknown"
);
probe_int
(
"level"
,
dec_ctx
->
level
);
break
;
...
...
cmdutils.c
View file @
b7f1010c
...
...
@@ -866,7 +866,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)
int
show_pix_fmts
(
void
*
optctx
,
const
char
*
opt
,
const
char
*
arg
)
{
enum
AVPixelFormat
pix_fmt
;
const
AVPixFmtDescriptor
*
pix_desc
=
NULL
;
printf
(
"Pixel formats:
\n
"
"I.... = Supported Input format for conversion
\n
"
...
...
@@ -882,8 +882,8 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg)
# define sws_isSupportedOutput(x) 0
#endif
for
(
pix_fmt
=
0
;
pix_fmt
<
AV_PIX_FMT_NB
;
pix_fmt
++
)
{
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
pix_fmt
]
;
while
((
pix_desc
=
av_pix_fmt_desc_next
(
pix_desc
))
)
{
enum
AVPixelFormat
pix_fmt
=
av_pix_fmt_desc_get_id
(
pix_desc
)
;
printf
(
"%c%c%c%c%c %-16s %d %2d
\n
"
,
sws_isSupportedInput
(
pix_fmt
)
?
'I'
:
'.'
,
sws_isSupportedOutput
(
pix_fmt
)
?
'O'
:
'.'
,
...
...
@@ -1282,13 +1282,19 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
static
int
alloc_buffer
(
FrameBuffer
**
pool
,
AVCodecContext
*
s
,
FrameBuffer
**
pbuf
)
{
FrameBuffer
*
buf
=
av_mallocz
(
sizeof
(
*
buf
));
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
s
->
pix_fmt
);
FrameBuffer
*
buf
;
int
i
,
ret
;
const
int
pixel_size
=
av_pix_fmt_descriptors
[
s
->
pix_fmt
].
comp
[
0
].
step_minus1
+
1
;
int
pixel_size
;
int
h_chroma_shift
,
v_chroma_shift
;
int
edge
=
32
;
// XXX should be avcodec_get_edge_width(), but that fails on svq1
int
w
=
s
->
width
,
h
=
s
->
height
;
if
(
!
desc
)
return
AVERROR
(
EINVAL
);
pixel_size
=
desc
->
comp
[
0
].
step_minus1
+
1
;
buf
=
av_mallocz
(
sizeof
(
*
buf
));
if
(
!
buf
)
return
AVERROR
(
ENOMEM
);
...
...
tools/graph2dot.c
View file @
b7f1010c
...
...
@@ -80,10 +80,10 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph)
fprintf
(
outfile
,
"
\"
%s
\"
->
\"
%s
\"
"
,
filter_ctx_label
,
dst_filter_ctx_label
);
if
(
link
->
type
==
AVMEDIA_TYPE_VIDEO
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
link
->
format
);
fprintf
(
outfile
,
" [ label=
\"
fmt:%s w:%d h:%d tb:%d/%d
\"
]"
,
av_pix_fmt_descriptors
[
link
->
format
].
name
,
link
->
w
,
link
->
h
,
link
->
time_base
.
num
,
desc
->
name
,
link
->
w
,
link
->
h
,
link
->
time_base
.
num
,
link
->
time_base
.
den
);
}
else
if
(
link
->
type
==
AVMEDIA_TYPE_AUDIO
)
{
char
buf
[
255
];
...
...
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