Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
e16f217c
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,发现更多精彩内容 >>
提交
e16f217c
编写于
9月 07, 2010
作者:
S
Stefano Sabatini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use new imgutils.h API names, fix deprecation warnings.
Originally committed as revision 25058 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
9b7269e3
变更
51
隐藏空白更改
内联
并排
Showing
51 changed file
with
66 addition
and
66 deletion
+66
-66
libavcodec/avcodec.h
libavcodec/avcodec.h
+1
-1
libavcodec/bink.c
libavcodec/bink.c
+1
-1
libavcodec/dirac.c
libavcodec/dirac.c
+1
-1
libavcodec/dnxhddec.c
libavcodec/dnxhddec.c
+1
-1
libavcodec/dpx.c
libavcodec/dpx.c
+1
-1
libavcodec/eacmv.c
libavcodec/eacmv.c
+1
-1
libavcodec/eamad.c
libavcodec/eamad.c
+1
-1
libavcodec/eatgv.c
libavcodec/eatgv.c
+1
-1
libavcodec/flvdec.c
libavcodec/flvdec.c
+1
-1
libavcodec/gifdec.c
libavcodec/gifdec.c
+1
-1
libavcodec/h264_ps.c
libavcodec/h264_ps.c
+1
-1
libavcodec/iff.c
libavcodec/iff.c
+1
-1
libavcodec/imgconvert.c
libavcodec/imgconvert.c
+8
-8
libavcodec/indeo3.c
libavcodec/indeo3.c
+1
-1
libavcodec/kgv1dec.c
libavcodec/kgv1dec.c
+1
-1
libavcodec/libdiracdec.c
libavcodec/libdiracdec.c
+1
-1
libavcodec/libopenjpeg.c
libavcodec/libopenjpeg.c
+1
-1
libavcodec/libschroedingerdec.c
libavcodec/libschroedingerdec.c
+1
-1
libavcodec/libvpxdec.c
libavcodec/libvpxdec.c
+1
-1
libavcodec/mjpegdec.c
libavcodec/mjpegdec.c
+1
-1
libavcodec/mpegvideo.c
libavcodec/mpegvideo.c
+1
-1
libavcodec/nuv.c
libavcodec/nuv.c
+1
-1
libavcodec/pcx.c
libavcodec/pcx.c
+1
-1
libavcodec/pgssubdec.c
libavcodec/pgssubdec.c
+1
-1
libavcodec/pictordec.c
libavcodec/pictordec.c
+1
-1
libavcodec/pngdec.c
libavcodec/pngdec.c
+1
-1
libavcodec/pnm.c
libavcodec/pnm.c
+2
-2
libavcodec/ptx.c
libavcodec/ptx.c
+1
-1
libavcodec/qtrleenc.c
libavcodec/qtrleenc.c
+1
-1
libavcodec/rv10.c
libavcodec/rv10.c
+1
-1
libavcodec/rv40.c
libavcodec/rv40.c
+1
-1
libavcodec/sgidec.c
libavcodec/sgidec.c
+1
-1
libavcodec/sunrast.c
libavcodec/sunrast.c
+1
-1
libavcodec/targa.c
libavcodec/targa.c
+1
-1
libavcodec/tiff.c
libavcodec/tiff.c
+2
-2
libavcodec/txd.c
libavcodec/txd.c
+1
-1
libavcodec/utils.c
libavcodec/utils.c
+5
-5
libavcodec/vp3.c
libavcodec/vp3.c
+1
-1
libavcodec/vp8.c
libavcodec/vp8.c
+1
-1
libavcodec/vqavideo.c
libavcodec/vqavideo.c
+1
-1
libavcodec/xsubdec.c
libavcodec/xsubdec.c
+1
-1
libavcodec/yop.c
libavcodec/yop.c
+1
-1
libavdevice/avdevice.h
libavdevice/avdevice.h
+1
-1
libavdevice/v4l.c
libavdevice/v4l.c
+1
-1
libavdevice/v4l2.c
libavdevice/v4l2.c
+1
-1
libavfilter/avfilter.c
libavfilter/avfilter.c
+1
-1
libavfilter/avfilter.h
libavfilter/avfilter.h
+1
-1
libavfilter/defaults.c
libavfilter/defaults.c
+3
-3
libavfilter/vf_crop.c
libavfilter/vf_crop.c
+1
-1
libavfilter/vf_hflip.c
libavfilter/vf_hflip.c
+1
-1
libavfilter/vf_pad.c
libavfilter/vf_pad.c
+1
-1
未找到文件。
libavcodec/avcodec.h
浏览文件 @
e16f217c
...
...
@@ -32,7 +32,7 @@
#define LIBAVCODEC_VERSION_MAJOR 52
#define LIBAVCODEC_VERSION_MINOR 87
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_MICRO
2
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
libavcodec/bink.c
浏览文件 @
e16f217c
...
...
@@ -972,7 +972,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
c
->
pic
.
data
[
0
]
=
NULL
;
if
(
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
if
(
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
return
1
;
}
...
...
libavcodec/dirac.c
浏览文件 @
e16f217c
...
...
@@ -269,7 +269,7 @@ int ff_dirac_parse_sequence_header(AVCodecContext *avctx, GetBitContext *gb,
if
(
parse_source_parameters
(
avctx
,
gb
,
source
))
return
-
1
;
if
(
av_
check_image
_size
(
source
->
width
,
source
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
source
->
width
,
source
->
height
,
0
,
avctx
))
return
-
1
;
avcodec_set_dimensions
(
avctx
,
source
->
width
,
source
->
height
);
...
...
libavcodec/dnxhddec.c
浏览文件 @
e16f217c
...
...
@@ -306,7 +306,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
avctx
->
pix_fmt
=
PIX_FMT_YUV422P
;
if
(
av_
check_image
_size
(
ctx
->
width
,
ctx
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
ctx
->
width
,
ctx
->
height
,
0
,
avctx
))
return
-
1
;
avcodec_set_dimensions
(
avctx
,
ctx
->
width
,
ctx
->
height
);
...
...
libavcodec/dpx.c
浏览文件 @
e16f217c
...
...
@@ -140,7 +140,7 @@ static int decode_frame(AVCodecContext *avctx,
if
(
s
->
picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
picture
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/eacmv.c
浏览文件 @
e16f217c
...
...
@@ -157,7 +157,7 @@ static int cmv_decode_frame(AVCodecContext *avctx,
return
buf_size
;
}
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
return
-
1
;
/* shuffle */
...
...
libavcodec/eamad.c
浏览文件 @
e16f217c
...
...
@@ -261,7 +261,7 @@ static int decode_frame(AVCodecContext *avctx,
buf
+=
16
;
if
(
avctx
->
width
!=
s
->
width
||
avctx
->
height
!=
s
->
height
)
{
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)
<
0
)
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)
<
0
)
return
-
1
;
avcodec_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
if
(
t
->
frame
.
data
[
0
])
...
...
libavcodec/eatgv.c
浏览文件 @
e16f217c
...
...
@@ -276,7 +276,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
}
}
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
))
return
-
1
;
/* shuffle */
...
...
libavcodec/flvdec.c
浏览文件 @
e16f217c
...
...
@@ -83,7 +83,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
width
=
height
=
0
;
break
;
}
if
(
av_
check_image
_size
(
width
,
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
width
,
height
,
0
,
s
->
avctx
))
return
-
1
;
s
->
width
=
width
;
s
->
height
=
height
;
...
...
libavcodec/gifdec.c
浏览文件 @
e16f217c
...
...
@@ -297,7 +297,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A
return
-
1
;
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
if
(
av_
check_image
_size
(
s
->
screen_width
,
s
->
screen_height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
s
->
screen_width
,
s
->
screen_height
,
0
,
avctx
))
return
-
1
;
avcodec_set_dimensions
(
avctx
,
s
->
screen_width
,
s
->
screen_height
);
...
...
libavcodec/h264_ps.c
浏览文件 @
e16f217c
...
...
@@ -342,7 +342,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps
->
mb_width
=
get_ue_golomb
(
&
s
->
gb
)
+
1
;
sps
->
mb_height
=
get_ue_golomb
(
&
s
->
gb
)
+
1
;
if
((
unsigned
)
sps
->
mb_width
>=
INT_MAX
/
16
||
(
unsigned
)
sps
->
mb_height
>=
INT_MAX
/
16
||
av_
check_image
_size
(
16
*
sps
->
mb_width
,
16
*
sps
->
mb_height
,
0
,
h
->
s
.
avctx
)){
av_
image_check
_size
(
16
*
sps
->
mb_width
,
16
*
sps
->
mb_height
,
0
,
h
->
s
.
avctx
)){
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"mb_width/height overflow
\n
"
);
goto
fail
;
}
...
...
libavcodec/iff.c
浏览文件 @
e16f217c
...
...
@@ -161,7 +161,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
if
((
err
=
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)))
if
((
err
=
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)))
return
err
;
s
->
planesize
=
FFALIGN
(
avctx
->
width
,
16
)
>>
3
;
// Align plane size in bits to word-boundary
s
->
planebuf
=
av_malloc
(
s
->
planesize
+
FF_INPUT_BUFFER_PADDING_SIZE
);
...
...
libavcodec/imgconvert.c
浏览文件 @
e16f217c
...
...
@@ -501,13 +501,13 @@ int ff_set_systematic_pal(uint32_t pal[256], enum PixelFormat pix_fmt){
#if LIBAVCODEC_VERSION_MAJOR < 53
int
ff_fill_linesize
(
AVPicture
*
picture
,
enum
PixelFormat
pix_fmt
,
int
width
)
{
return
av_
fill_image
_linesizes
(
picture
->
linesize
,
pix_fmt
,
width
);
return
av_
image_fill
_linesizes
(
picture
->
linesize
,
pix_fmt
,
width
);
}
int
ff_fill_pointer
(
AVPicture
*
picture
,
uint8_t
*
ptr
,
enum
PixelFormat
pix_fmt
,
int
height
)
{
return
av_
fill_image
_pointers
(
picture
->
data
,
pix_fmt
,
height
,
ptr
,
picture
->
linesize
);
return
av_
image_fill
_pointers
(
picture
->
data
,
pix_fmt
,
height
,
ptr
,
picture
->
linesize
);
}
#endif
...
...
@@ -515,13 +515,13 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr,
enum
PixelFormat
pix_fmt
,
int
width
,
int
height
)
{
if
(
av_
check_image
_size
(
width
,
height
,
0
,
NULL
))
if
(
av_
image_check
_size
(
width
,
height
,
0
,
NULL
))
return
-
1
;
if
(
av_
fill_image
_linesizes
(
picture
->
linesize
,
pix_fmt
,
width
))
if
(
av_
image_fill
_linesizes
(
picture
->
linesize
,
pix_fmt
,
width
))
return
-
1
;
return
av_
fill_image
_pointers
(
picture
->
data
,
pix_fmt
,
height
,
ptr
,
picture
->
linesize
);
return
av_
image_fill
_pointers
(
picture
->
data
,
pix_fmt
,
height
,
ptr
,
picture
->
linesize
);
}
int
avpicture_layout
(
const
AVPicture
*
src
,
enum
PixelFormat
pix_fmt
,
int
width
,
int
height
,
...
...
@@ -597,7 +597,7 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
int
avpicture_get_size
(
enum
PixelFormat
pix_fmt
,
int
width
,
int
height
)
{
AVPicture
dummy_pict
;
if
(
av_
check_image
_size
(
width
,
height
,
0
,
NULL
))
if
(
av_
image_check
_size
(
width
,
height
,
0
,
NULL
))
return
-
1
;
switch
(
pix_fmt
)
{
case
PIX_FMT_RGB8
:
...
...
@@ -797,7 +797,7 @@ void ff_img_copy_plane(uint8_t *dst, int dst_wrap,
#if LIBAVCODEC_VERSION_MAJOR < 53
int
ff_get_plane_bytewidth
(
enum
PixelFormat
pix_fmt
,
int
width
,
int
plane
)
{
return
av_
get_image
_linesize
(
pix_fmt
,
width
,
plane
);
return
av_
image_get
_linesize
(
pix_fmt
,
width
,
plane
);
}
#endif
...
...
@@ -814,7 +814,7 @@ void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
case
FF_PIXEL_PLANAR
:
for
(
i
=
0
;
i
<
pf
->
nb_channels
;
i
++
)
{
int
h
;
int
bwidth
=
av_
get_image
_linesize
(
pix_fmt
,
width
,
i
);
int
bwidth
=
av_
image_get
_linesize
(
pix_fmt
,
width
,
i
);
h
=
height
;
if
(
i
==
1
||
i
==
2
)
{
h
=
-
((
-
height
)
>>
desc
->
log2_chroma_h
);
...
...
libavcodec/indeo3.c
浏览文件 @
e16f217c
...
...
@@ -996,7 +996,7 @@ static int iv_decode_frame(AVCodecContext *avctx,
image_height
=
bytestream_get_le16
(
&
buf_pos
);
image_width
=
bytestream_get_le16
(
&
buf_pos
);
if
(
av_
check_image
_size
(
image_width
,
image_height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
image_width
,
image_height
,
0
,
avctx
))
return
-
1
;
if
(
image_width
!=
avctx
->
width
||
image_height
!=
avctx
->
height
)
{
int
ret
;
...
...
libavcodec/kgv1dec.c
浏览文件 @
e16f217c
...
...
@@ -51,7 +51,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
h
=
(
buf
[
1
]
+
1
)
*
8
;
buf
+=
2
;
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
...
...
libavcodec/libdiracdec.c
浏览文件 @
e16f217c
...
...
@@ -106,7 +106,7 @@ static int libdirac_decode_frame(AVCodecContext *avccontext,
/* tell FFmpeg about sequence details */
dirac_sourceparams_t
*
src_params
=
&
p_dirac_params
->
p_decoder
->
src_params
;
if
(
av_
check_image
_size
(
src_params
->
width
,
src_params
->
height
,
if
(
av_
image_check
_size
(
src_params
->
width
,
src_params
->
height
,
0
,
avccontext
)
<
0
)
{
av_log
(
avccontext
,
AV_LOG_ERROR
,
"Invalid dimensions (%dx%d)
\n
"
,
src_params
->
width
,
src_params
->
height
);
...
...
libavcodec/libopenjpeg.c
浏览文件 @
e16f217c
...
...
@@ -114,7 +114,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
}
width
=
image
->
comps
[
0
].
w
<<
avctx
->
lowres
;
height
=
image
->
comps
[
0
].
h
<<
avctx
->
lowres
;
if
(
av_
check_image
_size
(
width
,
height
,
0
,
avctx
)
<
0
)
{
if
(
av_
image_check
_size
(
width
,
height
,
0
,
avctx
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"%dx%d dimension invalid.
\n
"
,
width
,
height
);
goto
done
;
}
...
...
libavcodec/libschroedingerdec.c
浏览文件 @
e16f217c
...
...
@@ -170,7 +170,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext)
p_schro_params
->
format
=
schro_decoder_get_video_format
(
decoder
);
/* Tell FFmpeg about sequence details. */
if
(
av_
check_image
_size
(
p_schro_params
->
format
->
width
,
p_schro_params
->
format
->
height
,
if
(
av_
image_check
_size
(
p_schro_params
->
format
->
width
,
p_schro_params
->
format
->
height
,
0
,
avccontext
)
<
0
)
{
av_log
(
avccontext
,
AV_LOG_ERROR
,
"invalid dimensions (%dx%d)
\n
"
,
p_schro_params
->
format
->
width
,
p_schro_params
->
format
->
height
);
...
...
libavcodec/libvpxdec.c
浏览文件 @
e16f217c
...
...
@@ -87,7 +87,7 @@ static int vp8_decode(AVCodecContext *avctx,
if
((
int
)
img
->
d_w
!=
avctx
->
width
||
(
int
)
img
->
d_h
!=
avctx
->
height
)
{
av_log
(
avctx
,
AV_LOG_INFO
,
"dimension change! %dx%d -> %dx%d
\n
"
,
avctx
->
width
,
avctx
->
height
,
img
->
d_w
,
img
->
d_h
);
if
(
av_
check_image
_size
(
img
->
d_w
,
img
->
d_h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
img
->
d_w
,
img
->
d_h
,
0
,
avctx
))
return
AVERROR_INVALIDDATA
;
avcodec_set_dimensions
(
avctx
,
img
->
d_w
,
img
->
d_h
);
}
...
...
libavcodec/mjpegdec.c
浏览文件 @
e16f217c
...
...
@@ -219,7 +219,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
height
=
s
->
height
;
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"sof0: picture: %dx%d
\n
"
,
width
,
height
);
if
(
av_
check_image
_size
(
width
,
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
width
,
height
,
0
,
s
->
avctx
))
return
-
1
;
nb_components
=
get_bits
(
&
s
->
gb
,
8
);
...
...
libavcodec/mpegvideo.c
浏览文件 @
e16f217c
...
...
@@ -511,7 +511,7 @@ av_cold int MPV_common_init(MpegEncContext *s)
return
-
1
;
}
if
((
s
->
width
||
s
->
height
)
&&
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
if
((
s
->
width
||
s
->
height
)
&&
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
return
-
1
;
dsputil_init
(
&
s
->
dsp
,
s
->
avctx
);
...
...
libavcodec/nuv.c
浏览文件 @
e16f217c
...
...
@@ -112,7 +112,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit
if
(
quality
>=
0
)
get_quant_quality
(
c
,
quality
);
if
(
width
!=
c
->
width
||
height
!=
c
->
height
)
{
if
(
av_
check_image
_size
(
height
,
width
,
0
,
avctx
)
<
0
)
if
(
av_
image_check
_size
(
height
,
width
,
0
,
avctx
)
<
0
)
return
0
;
avctx
->
width
=
c
->
width
=
width
;
avctx
->
height
=
c
->
height
=
height
;
...
...
libavcodec/pcx.c
浏览文件 @
e16f217c
...
...
@@ -143,7 +143,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/pgssubdec.c
浏览文件 @
e16f217c
...
...
@@ -270,7 +270,7 @@ static void parse_presentation_segment(AVCodecContext *avctx,
dprintf
(
avctx
,
"Video Dimensions %dx%d
\n
"
,
w
,
h
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
)
>=
0
)
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
)
>=
0
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
/* Skip 1 bytes of unknown, frame rate? */
...
...
libavcodec/pictordec.c
浏览文件 @
e16f217c
...
...
@@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
if
(
s
->
width
!=
avctx
->
width
&&
s
->
height
!=
avctx
->
height
)
{
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)
<
0
)
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)
<
0
)
return
-
1
;
avcodec_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
if
(
s
->
frame
.
data
[
0
])
...
...
libavcodec/pngdec.c
浏览文件 @
e16f217c
...
...
@@ -442,7 +442,7 @@ static int decode_frame(AVCodecContext *avctx,
goto
fail
;
s
->
width
=
bytestream_get_be32
(
&
s
->
bytestream
);
s
->
height
=
bytestream_get_be32
(
&
s
->
bytestream
);
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
s
->
width
=
s
->
height
=
0
;
goto
fail
;
}
...
...
libavcodec/pnm.c
浏览文件 @
e16f217c
...
...
@@ -102,7 +102,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
}
}
/* check that all tags are present */
if
(
w
<=
0
||
h
<=
0
||
maxval
<=
0
||
depth
<=
0
||
tuple_type
[
0
]
==
'\0'
||
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
w
<=
0
||
h
<=
0
||
maxval
<=
0
||
depth
<=
0
||
tuple_type
[
0
]
==
'\0'
||
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
avctx
->
width
=
w
;
...
...
@@ -135,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
return
-
1
;
pnm_get
(
s
,
buf1
,
sizeof
(
buf1
));
avctx
->
height
=
atoi
(
buf1
);
if
(
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
return
-
1
;
if
(
avctx
->
pix_fmt
!=
PIX_FMT_MONOWHITE
)
{
pnm_get
(
s
,
buf1
,
sizeof
(
buf1
));
...
...
libavcodec/ptx.c
浏览文件 @
e16f217c
...
...
@@ -65,7 +65,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/qtrleenc.c
浏览文件 @
e16f217c
...
...
@@ -63,7 +63,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx)
{
QtrleEncContext
*
s
=
avctx
->
priv_data
;
if
(
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
if
(
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
return
-
1
;
}
s
->
avctx
=
avctx
;
...
...
libavcodec/rv10.c
浏览文件 @
e16f217c
...
...
@@ -370,7 +370,7 @@ static int rv20_decode_picture_header(MpegEncContext *s)
}
if
(
new_w
!=
s
->
width
||
new_h
!=
s
->
height
){
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"attempting to change resolution to %dx%d
\n
"
,
new_w
,
new_h
);
if
(
av_
check_image
_size
(
new_w
,
new_h
,
0
,
s
->
avctx
)
<
0
)
if
(
av_
image_check
_size
(
new_w
,
new_h
,
0
,
s
->
avctx
)
<
0
)
return
-
1
;
MPV_common_end
(
s
);
avcodec_set_dimensions
(
s
->
avctx
,
new_w
,
new_h
);
...
...
libavcodec/rv40.c
浏览文件 @
e16f217c
...
...
@@ -144,7 +144,7 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
si
->
pts
=
get_bits
(
gb
,
13
);
if
(
!
si
->
type
||
!
get_bits1
(
gb
))
rv40_parse_picture_size
(
gb
,
&
w
,
&
h
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
r
->
s
.
avctx
)
<
0
)
if
(
av_
image_check
_size
(
w
,
h
,
0
,
r
->
s
.
avctx
)
<
0
)
return
-
1
;
si
->
width
=
w
;
si
->
height
=
h
;
...
...
libavcodec/sgidec.c
浏览文件 @
e16f217c
...
...
@@ -202,7 +202,7 @@ static int decode_frame(AVCodecContext *avctx,
return
-
1
;
}
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
))
return
-
1
;
avcodec_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
...
...
libavcodec/sunrast.c
浏览文件 @
e16f217c
...
...
@@ -98,7 +98,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/targa.c
浏览文件 @
e16f217c
...
...
@@ -146,7 +146,7 @@ static int decode_frame(AVCodecContext *avctx,
if
(
s
->
picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
picture
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/tiff.c
浏览文件 @
e16f217c
...
...
@@ -306,7 +306,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
return
-
1
;
}
if
(
s
->
width
!=
s
->
avctx
->
width
||
s
->
height
!=
s
->
avctx
->
height
){
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
return
-
1
;
avcodec_set_dimensions
(
s
->
avctx
,
s
->
width
,
s
->
height
);
}
...
...
@@ -508,7 +508,7 @@ static int decode_frame(AVCodecContext *avctx,
s
->
bpp
=
1
;
avctx
->
pix_fmt
=
PIX_FMT_MONOBLACK
;
if
(
s
->
width
!=
s
->
avctx
->
width
||
s
->
height
!=
s
->
avctx
->
height
){
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
s
->
avctx
))
return
-
1
;
avcodec_set_dimensions
(
s
->
avctx
,
s
->
width
,
s
->
height
);
}
...
...
libavcodec/txd.c
浏览文件 @
e16f217c
...
...
@@ -80,7 +80,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
))
return
-
1
;
if
(
w
!=
avctx
->
width
||
h
!=
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
w
,
h
);
...
...
libavcodec/utils.c
浏览文件 @
e16f217c
...
...
@@ -215,7 +215,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
#if LIBAVCODEC_VERSION_MAJOR < 53
int
avcodec_check_dimensions
(
void
*
av_log_ctx
,
unsigned
int
w
,
unsigned
int
h
){
return
av_
check_image
_size
(
w
,
h
,
0
,
av_log_ctx
);
return
av_
image_check
_size
(
w
,
h
,
0
,
av_log_ctx
);
}
#endif
...
...
@@ -235,7 +235,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
return
-
1
;
}
if
(
av_
check_image
_size
(
w
,
h
,
0
,
s
))
if
(
av_
image_check
_size
(
w
,
h
,
0
,
s
))
return
-
1
;
if
(
s
->
internal_buffer
==
NULL
){
...
...
@@ -487,7 +487,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
#define SANE_NB_CHANNELS 128U
if
(((
avctx
->
coded_width
||
avctx
->
coded_height
)
&&
av_
check_image
_size
(
avctx
->
coded_width
,
avctx
->
coded_height
,
0
,
avctx
))
&&
av_
image_check
_size
(
avctx
->
coded_width
,
avctx
->
coded_height
,
0
,
avctx
))
||
avctx
->
channels
>
SANE_NB_CHANNELS
)
{
ret
=
AVERROR
(
EINVAL
);
goto
free_and_end
;
...
...
@@ -554,7 +554,7 @@ int attribute_align_arg avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf
av_log
(
avctx
,
AV_LOG_ERROR
,
"buffer smaller than minimum size
\n
"
);
return
-
1
;
}
if
(
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
if
(
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
))
return
-
1
;
if
((
avctx
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
||
pict
){
int
ret
=
avctx
->
codec
->
encode
(
avctx
,
buf
,
buf_size
,
pict
);
...
...
@@ -604,7 +604,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
int
ret
;
*
got_picture_ptr
=
0
;
if
((
avctx
->
coded_width
||
avctx
->
coded_height
)
&&
av_
check_image
_size
(
avctx
->
coded_width
,
avctx
->
coded_height
,
0
,
avctx
))
if
((
avctx
->
coded_width
||
avctx
->
coded_height
)
&&
av_
image_check
_size
(
avctx
->
coded_width
,
avctx
->
coded_height
,
0
,
avctx
))
return
-
1
;
if
((
avctx
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
||
avpkt
->
size
){
ret
=
avctx
->
codec
->
decode
(
avctx
,
picture
,
got_picture_ptr
,
...
...
libavcodec/vp3.c
浏览文件 @
e16f217c
...
...
@@ -1981,7 +1981,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
visible_width
=
s
->
width
=
get_bits
(
gb
,
16
)
<<
4
;
visible_height
=
s
->
height
=
get_bits
(
gb
,
16
)
<<
4
;
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid dimensions (%dx%d)
\n
"
,
s
->
width
,
s
->
height
);
s
->
width
=
s
->
height
=
0
;
return
-
1
;
...
...
libavcodec/vp8.c
浏览文件 @
e16f217c
...
...
@@ -223,7 +223,7 @@ static void vp8_decode_flush(AVCodecContext *avctx)
static
int
update_dimensions
(
VP8Context
*
s
,
int
width
,
int
height
)
{
if
(
av_
check_image
_size
(
width
,
height
,
0
,
s
->
avctx
))
if
(
av_
image_check
_size
(
width
,
height
,
0
,
s
->
avctx
))
return
AVERROR_INVALIDDATA
;
vp8_decode_flush
(
s
->
avctx
);
...
...
libavcodec/vqavideo.c
浏览文件 @
e16f217c
...
...
@@ -148,7 +148,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
s
->
vqa_version
=
vqa_header
[
0
];
s
->
width
=
AV_RL16
(
&
vqa_header
[
6
]);
s
->
height
=
AV_RL16
(
&
vqa_header
[
8
]);
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
s
->
width
=
s
->
height
=
0
;
return
-
1
;
}
...
...
libavcodec/xsubdec.c
浏览文件 @
e16f217c
...
...
@@ -77,7 +77,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// read header
w
=
bytestream_get_le16
(
&
buf
);
h
=
bytestream_get_le16
(
&
buf
);
if
(
av_
check_image
_size
(
w
,
h
,
0
,
avctx
)
<
0
)
if
(
av_
image_check
_size
(
w
,
h
,
0
,
avctx
)
<
0
)
return
-
1
;
x
=
bytestream_get_le16
(
&
buf
);
y
=
bytestream_get_le16
(
&
buf
);
...
...
libavcodec/yop.c
浏览文件 @
e16f217c
...
...
@@ -85,7 +85,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
s
->
avctx
=
avctx
;
if
(
avctx
->
width
&
1
||
avctx
->
height
&
1
||
av_
check_image
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
av_
image_check
_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"YOP has invalid dimensions
\n
"
);
return
-
1
;
}
...
...
libavdevice/avdevice.h
浏览文件 @
e16f217c
...
...
@@ -23,7 +23,7 @@
#define LIBAVDEVICE_VERSION_MAJOR 52
#define LIBAVDEVICE_VERSION_MINOR 2
#define LIBAVDEVICE_VERSION_MICRO
1
#define LIBAVDEVICE_VERSION_MICRO
2
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \
...
...
libavdevice/v4l.c
浏览文件 @
e16f217c
...
...
@@ -117,7 +117,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
}
}
if
(
av_
check_image
_size
(
s
->
video_win
.
width
,
s
->
video_win
.
height
,
0
,
s1
)
<
0
)
if
(
av_
image_check
_size
(
s
->
video_win
.
width
,
s
->
video_win
.
height
,
0
,
s1
)
<
0
)
return
-
1
;
desired_palette
=
-
1
;
...
...
libavdevice/v4l2.c
浏览文件 @
e16f217c
...
...
@@ -629,7 +629,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
return
AVERROR
(
EIO
);
}
if
(
av_
check_image
_size
(
s
->
width
,
s
->
height
,
0
,
s1
)
<
0
)
if
(
av_
image_check
_size
(
s
->
width
,
s
->
height
,
0
,
s1
)
<
0
)
return
AVERROR
(
EINVAL
);
s
->
frame_format
=
desired_format
;
...
...
libavfilter/avfilter.c
浏览文件 @
e16f217c
...
...
@@ -381,7 +381,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
planew
=
av_
get_image
_linesize
(
link
->
format
,
link
->
cur_buf
->
video
->
w
,
i
);
av_
image_get
_linesize
(
link
->
format
,
link
->
cur_buf
->
video
->
w
,
i
);
if
(
!
src
[
i
])
continue
;
...
...
libavfilter/avfilter.h
浏览文件 @
e16f217c
...
...
@@ -26,7 +26,7 @@
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 38
#define LIBAVFILTER_VERSION_MICRO
1
#define LIBAVFILTER_VERSION_MICRO
2
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/defaults.c
浏览文件 @
e16f217c
...
...
@@ -54,17 +54,17 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
pic
->
refcount
=
1
;
ref
->
format
=
link
->
format
;
pic
->
free
=
avfilter_default_free_buffer
;
av_
fill_image
_linesizes
(
pic
->
linesize
,
ref
->
format
,
ref
->
video
->
w
);
av_
image_fill
_linesizes
(
pic
->
linesize
,
ref
->
format
,
ref
->
video
->
w
);
for
(
i
=
0
;
i
<
4
;
i
++
)
pic
->
linesize
[
i
]
=
FFALIGN
(
pic
->
linesize
[
i
],
16
);
tempsize
=
av_
fill_image
_pointers
(
pic
->
data
,
ref
->
format
,
ref
->
video
->
h
,
NULL
,
pic
->
linesize
);
tempsize
=
av_
image_fill
_pointers
(
pic
->
data
,
ref
->
format
,
ref
->
video
->
h
,
NULL
,
pic
->
linesize
);
buf
=
av_malloc
(
tempsize
+
16
);
// +2 is needed for swscaler, +16 to be
// SIMD-friendly
if
(
!
buf
)
goto
fail
;
av_
fill_image
_pointers
(
pic
->
data
,
ref
->
format
,
ref
->
video
->
h
,
buf
,
pic
->
linesize
);
av_
image_fill
_pointers
(
pic
->
data
,
ref
->
format
,
ref
->
video
->
h
,
buf
,
pic
->
linesize
);
memcpy
(
ref
->
data
,
pic
->
data
,
sizeof
(
ref
->
data
));
memcpy
(
ref
->
linesize
,
pic
->
linesize
,
sizeof
(
ref
->
linesize
));
...
...
libavfilter/vf_crop.c
浏览文件 @
e16f217c
...
...
@@ -84,7 +84,7 @@ static int config_input(AVFilterLink *link)
CropContext
*
crop
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
link
->
format
];
av_
fill_image
_max_pixsteps
(
crop
->
max_step
,
NULL
,
pix_desc
);
av_
image_fill
_max_pixsteps
(
crop
->
max_step
,
NULL
,
pix_desc
);
crop
->
hsub
=
av_pix_fmt_descriptors
[
link
->
format
].
log2_chroma_w
;
crop
->
vsub
=
av_pix_fmt_descriptors
[
link
->
format
].
log2_chroma_h
;
...
...
libavfilter/vf_hflip.c
浏览文件 @
e16f217c
...
...
@@ -70,7 +70,7 @@ static int config_props(AVFilterLink *inlink)
FlipContext
*
flip
=
inlink
->
dst
->
priv
;
const
AVPixFmtDescriptor
*
pix_desc
=
&
av_pix_fmt_descriptors
[
inlink
->
format
];
av_
fill_image
_max_pixsteps
(
flip
->
max_step
,
NULL
,
pix_desc
);
av_
image_fill
_max_pixsteps
(
flip
->
max_step
,
NULL
,
pix_desc
);
flip
->
hsub
=
av_pix_fmt_descriptors
[
inlink
->
format
].
log2_chroma_w
;
flip
->
vsub
=
av_pix_fmt_descriptors
[
inlink
->
format
].
log2_chroma_h
;
...
...
libavfilter/vf_pad.c
浏览文件 @
e16f217c
...
...
@@ -407,7 +407,7 @@ static int color_config_props(AVFilterLink *inlink)
color
->
w
&=
~
((
1
<<
color
->
hsub
)
-
1
);
color
->
h
&=
~
((
1
<<
color
->
vsub
)
-
1
);
if
(
av_
check_image
_size
(
color
->
w
,
color
->
h
,
0
,
ctx
)
<
0
)
if
(
av_
image_check
_size
(
color
->
w
,
color
->
h
,
0
,
ctx
)
<
0
)
return
AVERROR
(
EINVAL
);
memcpy
(
rgba_color
,
color
->
color
,
sizeof
(
rgba_color
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录