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
c9ad2e9a
Commit
c9ad2e9a
authored
Nov 21, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgconvert: remove avg_bits_per_pixel(), its redundant
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0705cbd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
imgconvert.c
libavcodec/imgconvert.c
+3
-10
No files found.
libavcodec/imgconvert.c
View file @
c9ad2e9a
...
...
@@ -177,13 +177,6 @@ int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
return
loss
;
}
static
int
avg_bits_per_pixel
(
enum
AVPixelFormat
pix_fmt
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
return
av_get_padded_bits_per_pixel
(
desc
);
}
#if FF_API_FIND_BEST_PIX_FMT
enum
AVPixelFormat
avcodec_find_best_pix_fmt
(
int64_t
pix_fmt_mask
,
enum
AVPixelFormat
src_pix_fmt
,
int
has_alpha
,
int
*
loss_ptr
)
...
...
@@ -236,8 +229,8 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt
loss_order2
=
loss2
&
loss_mask_order
[
i
];
if
(
loss_order1
==
0
&&
loss_order2
==
0
&&
dst_pix_fmt2
!=
AV_PIX_FMT_NONE
&&
dst_pix_fmt1
!=
AV_PIX_FMT_NONE
){
/* use format with smallest depth */
if
(
av
g_bits_per_pixel
(
dst_pix_fmt2
)
!=
avg_bits_per_pixel
(
dst_pix_fmt
1
))
{
dst_pix_fmt
=
av
g_bits_per_pixel
(
dst_pix_fmt2
)
<
avg_bits_per_pixel
(
dst_pix_fmt
1
)
?
dst_pix_fmt2
:
dst_pix_fmt1
;
if
(
av
_get_padded_bits_per_pixel
(
desc2
)
!=
av_get_padded_bits_per_pixel
(
desc
1
))
{
dst_pix_fmt
=
av
_get_padded_bits_per_pixel
(
desc2
)
<
av_get_padded_bits_per_pixel
(
desc
1
)
?
dst_pix_fmt2
:
dst_pix_fmt1
;
}
else
{
dst_pix_fmt
=
desc2
->
nb_components
<
desc1
->
nb_components
?
dst_pix_fmt2
:
dst_pix_fmt1
;
}
...
...
@@ -644,7 +637,7 @@ int main(void){
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
i
);
if
(
!
desc
)
continue
;
av_log
(
0
,
AV_LOG_INFO
,
"pix fmt %s yuv_plan:%d avg_bpp:%d colortype:%d
\n
"
,
desc
->
name
,
is_yuv_planar
(
desc
),
av
g_bits_per_pixel
(
i
),
get_color_type
(
desc
));
av_log
(
0
,
AV_LOG_INFO
,
"pix fmt %s yuv_plan:%d avg_bpp:%d colortype:%d
\n
"
,
desc
->
name
,
is_yuv_planar
(
desc
),
av
_get_padded_bits_per_pixel
(
desc
),
get_color_type
(
desc
));
}
return
0
;
}
...
...
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