Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
79393a83
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
79393a83
编写于
10月 20, 2012
作者:
H
Hendrik Leppkes
提交者:
Michael Niedermayer
10月 20, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by:
N
Michael Niedermayer
<
michaelni@gmx.at
>
上级
2c5b92fe
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
22 addition
and
22 deletion
+22
-22
ffmpeg_filter.c
ffmpeg_filter.c
+3
-3
libavcodec/libstagefright.cpp
libavcodec/libstagefright.cpp
+1
-1
libavfilter/avfiltergraph.c
libavfilter/avfiltergraph.c
+1
-1
libavfilter/vf_colormatrix.c
libavfilter/vf_colormatrix.c
+1
-1
libavfilter/vf_decimate.c
libavfilter/vf_decimate.c
+1
-1
libavfilter/vf_deshake.c
libavfilter/vf_deshake.c
+2
-2
libavfilter/vf_hflip.c
libavfilter/vf_hflip.c
+1
-1
libavfilter/vf_hue.c
libavfilter/vf_hue.c
+1
-1
libavfilter/vf_idet.c
libavfilter/vf_idet.c
+1
-1
libavfilter/vf_overlay.c
libavfilter/vf_overlay.c
+1
-1
libavfilter/vf_smartblur.c
libavfilter/vf_smartblur.c
+1
-1
libavfilter/vf_tinterlace.c
libavfilter/vf_tinterlace.c
+2
-2
libavfilter/video.c
libavfilter/video.c
+1
-1
libavfilter/vsrc_mptestsrc.c
libavfilter/vsrc_mptestsrc.c
+1
-1
libswscale/swscale_internal.h
libswscale/swscale_internal.h
+2
-2
libswscale/x86/swscale.c
libswscale/x86/swscale.c
+1
-1
tools/fourcc2pixfmt.c
tools/fourcc2pixfmt.c
+1
-1
未找到文件。
ffmpeg_filter.c
浏览文件 @
79393a83
...
...
@@ -37,7 +37,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
{
if
(
codec
&&
codec
->
pix_fmts
)
{
const
enum
AVPixelFormat
*
p
=
codec
->
pix_fmts
;
int
has_alpha
=
av_pix_fmt_desc
riptors
[
target
].
nb_components
%
2
==
0
;
int
has_alpha
=
av_pix_fmt_desc
_get
(
target
)
->
nb_components
%
2
==
0
;
enum
AVPixelFormat
best
=
AV_PIX_FMT_NONE
;
if
(
st
->
codec
->
strict_std_compliance
<=
FF_COMPLIANCE_UNOFFICIAL
)
{
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_MJPEG
)
{
...
...
@@ -56,9 +56,9 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
if
(
target
!=
AV_PIX_FMT_NONE
)
av_log
(
NULL
,
AV_LOG_WARNING
,
"Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'
\n
"
,
av_
pix_fmt_descriptors
[
target
].
name
,
av_
get_pix_fmt_name
(
target
)
,
codec
->
name
,
av_
pix_fmt_descriptors
[
best
].
name
);
av_
get_pix_fmt_name
(
best
)
);
return
best
;
}
}
...
...
libavcodec/libstagefright.cpp
浏览文件 @
79393a83
...
...
@@ -153,7 +153,7 @@ void* decode_thread(void *arg)
{
AVCodecContext
*
avctx
=
(
AVCodecContext
*
)
arg
;
StagefrightContext
*
s
=
(
StagefrightContext
*
)
avctx
->
priv_data
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
avctx
->
pix_fmt
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
)
;
Frame
*
frame
;
MediaBuffer
*
buffer
;
int32_t
w
,
h
;
...
...
libavfilter/avfiltergraph.c
浏览文件 @
79393a83
...
...
@@ -424,7 +424,7 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref)
if
(
link
->
type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
ref
&&
ref
->
type
==
AVMEDIA_TYPE_VIDEO
){
int
has_alpha
=
av_pix_fmt_desc
riptors
[
ref
->
format
].
nb_components
%
2
==
0
;
int
has_alpha
=
av_pix_fmt_desc
_get
(
ref
->
format
)
->
nb_components
%
2
==
0
;
enum
AVPixelFormat
best
=
AV_PIX_FMT_NONE
;
int
i
;
for
(
i
=
0
;
i
<
link
->
in_formats
->
format_count
;
i
++
)
{
...
...
libavfilter/vf_colormatrix.c
浏览文件 @
79393a83
...
...
@@ -308,7 +308,7 @@ static int config_input(AVFilterLink *inlink)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
ColorMatrixContext
*
color
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
inlink
->
format
)
;
color
->
hsub
=
pix_desc
->
log2_chroma_w
;
color
->
vsub
=
pix_desc
->
log2_chroma_h
;
...
...
libavfilter/vf_decimate.c
浏览文件 @
79393a83
...
...
@@ -180,7 +180,7 @@ static int config_input(AVFilterLink *inlink)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
DecimateContext
*
decimate
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
inlink
->
format
)
;
decimate
->
hsub
=
pix_desc
->
log2_chroma_w
;
decimate
->
vsub
=
pix_desc
->
log2_chroma_h
;
...
...
libavfilter/vf_deshake.c
浏览文件 @
79393a83
...
...
@@ -59,8 +59,8 @@
#include "transform.h"
#define CHROMA_WIDTH(link) -((-link->w) >> av_pix_fmt_desc
riptors[link->format].
log2_chroma_w)
#define CHROMA_HEIGHT(link) -((-link->h) >> av_pix_fmt_desc
riptors[link->format].
log2_chroma_h)
#define CHROMA_WIDTH(link) -((-link->w) >> av_pix_fmt_desc
_get(link->format)->
log2_chroma_w)
#define CHROMA_HEIGHT(link) -((-link->h) >> av_pix_fmt_desc
_get(link->format)->
log2_chroma_h)
enum
SearchMethod
{
EXHAUSTIVE
,
///< Search all possible positions
...
...
libavfilter/vf_hflip.c
浏览文件 @
79393a83
...
...
@@ -95,7 +95,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
avfilter_copy_buffer_ref_props
(
outlink
->
out_buf
,
picref
);
/* copy palette if required */
if
(
av_pix_fmt_desc
riptors
[
inlink
->
format
].
flags
&
PIX_FMT_PAL
)
if
(
av_pix_fmt_desc
_get
(
inlink
->
format
)
->
flags
&
PIX_FMT_PAL
)
memcpy
(
inlink
->
dst
->
outputs
[
0
]
->
out_buf
->
data
[
1
],
picref
->
data
[
1
],
AVPALETTE_SIZE
);
return
ff_start_frame
(
outlink
,
avfilter_ref_buffer
(
outlink
->
out_buf
,
~
0
));
...
...
libavfilter/vf_hue.c
浏览文件 @
79393a83
...
...
@@ -252,7 +252,7 @@ static int query_formats(AVFilterContext *ctx)
static
int
config_props
(
AVFilterLink
*
inlink
)
{
HueContext
*
hue
=
inlink
->
dst
->
priv
;
const
AVPixFmtDescriptor
*
desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
]
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
)
;
hue
->
hsub
=
desc
->
log2_chroma_w
;
hue
->
vsub
=
desc
->
log2_chroma_h
;
...
...
libavfilter/vf_idet.c
浏览文件 @
79393a83
...
...
@@ -195,7 +195,7 @@ static int end_frame(AVFilterLink *link)
return
0
;
if
(
!
idet
->
csp
)
idet
->
csp
=
&
av_pix_fmt_descriptors
[
link
->
format
]
;
idet
->
csp
=
av_pix_fmt_desc_get
(
link
->
format
)
;
if
(
idet
->
csp
->
comp
[
0
].
depth_minus1
/
8
==
1
)
idet
->
filter_line
=
(
void
*
)
filter_line_c_16bit
;
...
...
libavfilter/vf_overlay.c
浏览文件 @
79393a83
...
...
@@ -217,7 +217,7 @@ static int config_input_overlay(AVFilterLink *inlink)
char
*
expr
;
double
var_values
[
VAR_VARS_NB
],
res
;
int
ret
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
inlink
->
format
)
;
av_image_fill_max_pixsteps
(
over
->
overlay_pix_step
,
NULL
,
pix_desc
);
...
...
libavfilter/vf_smartblur.c
浏览文件 @
79393a83
...
...
@@ -169,7 +169,7 @@ static int alloc_sws_context(FilterParam *f, int width, int height, unsigned int
static
int
config_props
(
AVFilterLink
*
inlink
)
{
SmartblurContext
*
sblur
=
inlink
->
dst
->
priv
;
const
AVPixFmtDescriptor
*
desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
]
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
)
;
sblur
->
hsub
=
desc
->
log2_chroma_w
;
sblur
->
vsub
=
desc
->
log2_chroma_h
;
...
...
libavfilter/vf_tinterlace.c
浏览文件 @
79393a83
...
...
@@ -130,7 +130,7 @@ static int config_out_props(AVFilterLink *outlink)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
AVFilterLink
*
inlink
=
outlink
->
src
->
inputs
[
0
];
const
AVPixFmtDescriptor
*
desc
=
&
av_pix_fmt_descriptors
[
outlink
->
format
]
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
outlink
->
format
)
;
TInterlaceContext
*
tinterlace
=
ctx
->
priv
;
tinterlace
->
vsub
=
desc
->
log2_chroma_h
;
...
...
@@ -179,7 +179,7 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
enum
AVPixelFormat
format
,
int
w
,
int
src_h
,
int
src_field
,
int
interleave
,
int
dst_field
)
{
const
AVPixFmtDescriptor
*
desc
=
&
av_pix_fmt_descriptors
[
format
]
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
format
)
;
int
plane
,
vsub
=
desc
->
log2_chroma_h
;
int
k
=
src_field
==
FIELD_UPPER_AND_LOWER
?
1
:
2
;
...
...
libavfilter/video.c
浏览文件 @
79393a83
...
...
@@ -286,7 +286,7 @@ int ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
avfilter_copy_buffer_ref_props
(
link
->
cur_buf
,
link
->
src_buf
);
/* copy palette if required */
if
(
av_pix_fmt_desc
riptors
[
link
->
format
].
flags
&
PIX_FMT_PAL
)
if
(
av_pix_fmt_desc
_get
(
link
->
format
)
->
flags
&
PIX_FMT_PAL
)
memcpy
(
link
->
cur_buf
->
data
[
1
],
link
->
src_buf
->
data
[
1
],
AVPALETTE_SIZE
);
}
else
...
...
libavfilter/vsrc_mptestsrc.c
浏览文件 @
79393a83
...
...
@@ -298,7 +298,7 @@ static int config_props(AVFilterLink *outlink)
{
AVFilterContext
*
ctx
=
outlink
->
src
;
MPTestContext
*
test
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
outlink
->
format
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
outlink
->
format
)
;
test
->
hsub
=
pix_desc
->
log2_chroma_w
;
test
->
vsub
=
pix_desc
->
log2_chroma_h
;
...
...
libswscale/swscale_internal.h
浏览文件 @
79393a83
...
...
@@ -602,8 +602,8 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt)
#if 0 // FIXME
#define isGray(x) \
(!(av_pix_fmt_desc
riptors[x].
flags & PIX_FMT_PAL) && \
av_pix_fmt_desc
riptors[x].
nb_components <= 2)
(!(av_pix_fmt_desc
_get(x)->
flags & PIX_FMT_PAL) && \
av_pix_fmt_desc
_get(x)->
nb_components <= 2)
#else
#define isGray(x) \
((x) == AV_PIX_FMT_GRAY8 || \
...
...
libswscale/x86/swscale.c
浏览文件 @
79393a83
...
...
@@ -402,7 +402,7 @@ av_cold void ff_sws_init_swScale_mmx(SwsContext *c)
} else if (c->srcBpc == 12) { \
hscalefn = c->dstBpc <= 14 ? ff_hscale12to15_ ## filtersize ## _ ## opt2 : \
ff_hscale12to19_ ## filtersize ## _ ## opt1; \
} else if (c->srcBpc == 14 || ((c->srcFormat==AV_PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_desc
riptors[c->srcFormat].
comp[0].depth_minus1<15)) { \
} else if (c->srcBpc == 14 || ((c->srcFormat==AV_PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_desc
_get(c->srcFormat)->
comp[0].depth_minus1<15)) { \
hscalefn = c->dstBpc <= 14 ? ff_hscale14to15_ ## filtersize ## _ ## opt2 : \
ff_hscale14to19_ ## filtersize ## _ ## opt1; \
} else {
/* c->srcBpc == 16 */
\
...
...
tools/fourcc2pixfmt.c
浏览文件 @
79393a83
...
...
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
if
(
list_pix_fmt_fourccs
)
{
for
(
i
=
0
;
i
<
AV_PIX_FMT_NB
;
i
++
)
{
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
i
]
;
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
i
)
;
if
(
!
pix_desc
->
name
||
pix_desc
->
flags
&
PIX_FMT_HWACCEL
)
continue
;
printf
(
"%s: "
,
pix_desc
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录