Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
67e370ee
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,发现更多精彩内容 >>
提交
67e370ee
编写于
3月 27, 2017
作者:
C
Clément Bœsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavc: fix usages of av_get_codec_tag_string()
上级
f156d353
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
31 deletion
+17
-31
libavcodec/dds.c
libavcodec/dds.c
+4
-8
libavcodec/mjpegdec.c
libavcodec/mjpegdec.c
+3
-5
libavcodec/mmaldec.c
libavcodec/mmaldec.c
+6
-9
libavcodec/sheervideo.c
libavcodec/sheervideo.c
+1
-3
libavcodec/utils.c
libavcodec/utils.c
+3
-6
未找到文件。
libavcodec/dds.c
浏览文件 @
67e370ee
...
@@ -117,7 +117,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
...
@@ -117,7 +117,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
{
{
DDSContext
*
ctx
=
avctx
->
priv_data
;
DDSContext
*
ctx
=
avctx
->
priv_data
;
GetByteContext
*
gbc
=
&
ctx
->
gbc
;
GetByteContext
*
gbc
=
&
ctx
->
gbc
;
char
buf
[
32
];
uint32_t
flags
,
fourcc
,
gimp_tag
;
uint32_t
flags
,
fourcc
,
gimp_tag
;
enum
DDSDXGIFormat
dxgi
;
enum
DDSDXGIFormat
dxgi
;
int
size
,
bpp
,
r
,
g
,
b
,
a
;
int
size
,
bpp
,
r
,
g
,
b
,
a
;
...
@@ -161,13 +160,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
...
@@ -161,13 +160,10 @@ static int parse_pixel_format(AVCodecContext *avctx)
bytestream2_skip
(
gbc
,
4
);
// caps4
bytestream2_skip
(
gbc
,
4
);
// caps4
bytestream2_skip
(
gbc
,
4
);
// reserved2
bytestream2_skip
(
gbc
,
4
);
// reserved2
av_get_codec_tag_string
(
buf
,
sizeof
(
buf
),
fourcc
);
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"fourcc %s bpp %d "
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"fourcc %s bpp %d "
"r 0x%x g 0x%x b 0x%x a 0x%x
\n
"
,
buf
,
bpp
,
r
,
g
,
b
,
a
);
"r 0x%x g 0x%x b 0x%x a 0x%x
\n
"
,
av_fourcc2str
(
fourcc
),
bpp
,
r
,
g
,
b
,
a
);
if
(
gimp_tag
)
{
if
(
gimp_tag
)
av_get_codec_tag_string
(
buf
,
sizeof
(
buf
),
gimp_tag
);
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"and GIMP-DDS tag %s
\n
"
,
av_fourcc2str
(
gimp_tag
));
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"and GIMP-DDS tag %s
\n
"
,
buf
);
}
if
(
ctx
->
compressed
)
if
(
ctx
->
compressed
)
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
...
@@ -344,7 +340,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
...
@@ -344,7 +340,7 @@ static int parse_pixel_format(AVCodecContext *avctx)
}
}
break
;
break
;
default:
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported %s fourcc.
\n
"
,
buf
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported %s fourcc.
\n
"
,
av_fourcc2str
(
fourcc
)
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
}
else
if
(
ctx
->
paletted
)
{
}
else
if
(
ctx
->
paletted
)
{
...
...
libavcodec/mjpegdec.c
浏览文件 @
67e370ee
...
@@ -1649,11 +1649,9 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
...
@@ -1649,11 +1649,9 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
id
=
get_bits_long
(
&
s
->
gb
,
32
);
id
=
get_bits_long
(
&
s
->
gb
,
32
);
len
-=
6
;
len
-=
6
;
if
(
s
->
avctx
->
debug
&
FF_DEBUG_STARTCODE
)
{
if
(
s
->
avctx
->
debug
&
FF_DEBUG_STARTCODE
)
char
id_str
[
32
];
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"APPx (%s / %8X) len=%d
\n
"
,
av_get_codec_tag_string
(
id_str
,
sizeof
(
id_str
),
av_bswap32
(
id
));
av_fourcc2str
(
av_bswap32
(
id
)),
id
,
len
);
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"APPx (%s / %8X) len=%d
\n
"
,
id_str
,
id
,
len
);
}
/* Buggy AVID, it puts EOI only at every 10th frame. */
/* Buggy AVID, it puts EOI only at every 10th frame. */
/* Also, this fourcc is used by non-avid files too, it holds some
/* Also, this fourcc is used by non-avid files too, it holds some
...
...
libavcodec/mmaldec.c
浏览文件 @
67e370ee
...
@@ -228,9 +228,8 @@ static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
...
@@ -228,9 +228,8 @@ static void control_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
status
=
*
(
uint32_t
*
)
buffer
->
data
;
status
=
*
(
uint32_t
*
)
buffer
->
data
;
av_log
(
avctx
,
AV_LOG_ERROR
,
"MMAL error %d on control port
\n
"
,
(
int
)
status
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"MMAL error %d on control port
\n
"
,
(
int
)
status
);
}
else
{
}
else
{
char
s
[
20
];
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown MMAL event %s on control port
\n
"
,
av_get_codec_tag_string
(
s
,
sizeof
(
s
),
buffer
->
cmd
);
av_fourcc2str
(
buffer
->
cmd
));
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown MMAL event %s on control port
\n
"
,
s
);
}
}
mmal_buffer_header_release
(
buffer
);
mmal_buffer_header_release
(
buffer
);
...
@@ -352,7 +351,6 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
...
@@ -352,7 +351,6 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
MMAL_STATUS_T
status
;
MMAL_STATUS_T
status
;
MMAL_ES_FORMAT_T
*
format_in
;
MMAL_ES_FORMAT_T
*
format_in
;
MMAL_COMPONENT_T
*
decoder
;
MMAL_COMPONENT_T
*
decoder
;
char
tmp
[
32
];
int
ret
=
0
;
int
ret
=
0
;
bcm_host_init
();
bcm_host_init
();
...
@@ -399,8 +397,8 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
...
@@ -399,8 +397,8 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
format_in
->
es
->
video
.
par
.
den
=
avctx
->
sample_aspect_ratio
.
den
;
format_in
->
es
->
video
.
par
.
den
=
avctx
->
sample_aspect_ratio
.
den
;
format_in
->
flags
=
MMAL_ES_FORMAT_FLAG_FRAMED
;
format_in
->
flags
=
MMAL_ES_FORMAT_FLAG_FRAMED
;
av_
get_codec_tag_string
(
tmp
,
sizeof
(
tmp
),
format_in
->
encoding
);
av_
log
(
avctx
,
AV_LOG_DEBUG
,
"Using MMAL %s encoding.
\n
"
,
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Using MMAL %s encoding.
\n
"
,
tmp
);
av_fourcc2str
(
format_in
->
encoding
)
);
#if HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
#if HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
if
(
mmal_port_parameter_set_uint32
(
decoder
->
input
[
0
],
MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
,
if
(
mmal_port_parameter_set_uint32
(
decoder
->
input
[
0
],
MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
,
...
@@ -742,9 +740,8 @@ static int ffmmal_read_frame(AVCodecContext *avctx, AVFrame *frame, int *got_fra
...
@@ -742,9 +740,8 @@ static int ffmmal_read_frame(AVCodecContext *avctx, AVFrame *frame, int *got_fra
mmal_buffer_header_release
(
buffer
);
mmal_buffer_header_release
(
buffer
);
continue
;
continue
;
}
else
if
(
buffer
->
cmd
)
{
}
else
if
(
buffer
->
cmd
)
{
char
s
[
20
];
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown MMAL event %s on output port
\n
"
,
av_get_codec_tag_string
(
s
,
sizeof
(
s
),
buffer
->
cmd
);
av_fourcc2str
(
buffer
->
cmd
));
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown MMAL event %s on output port
\n
"
,
s
);
goto
done
;
goto
done
;
}
else
if
(
buffer
->
length
==
0
)
{
}
else
if
(
buffer
->
length
==
0
)
{
// Unused output buffer that got drained after format change.
// Unused output buffer that got drained after format change.
...
...
libavcodec/sheervideo.c
浏览文件 @
67e370ee
...
@@ -2879,7 +2879,6 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -2879,7 +2879,6 @@ static int decode_frame(AVCodecContext *avctx,
AVFrame
*
p
=
data
;
AVFrame
*
p
=
data
;
GetBitContext
gb
;
GetBitContext
gb
;
unsigned
format
;
unsigned
format
;
char
format_str
[
32
];
int
ret
;
int
ret
;
if
(
avpkt
->
size
<=
20
)
if
(
avpkt
->
size
<=
20
)
...
@@ -2891,8 +2890,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -2891,8 +2890,7 @@ static int decode_frame(AVCodecContext *avctx,
s
->
alt
=
0
;
s
->
alt
=
0
;
format
=
AV_RL32
(
avpkt
->
data
+
16
);
format
=
AV_RL32
(
avpkt
->
data
+
16
);
av_get_codec_tag_string
(
format_str
,
sizeof
(
format_str
),
format
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"format: %s
\n
"
,
av_fourcc2str
(
format
));
av_log
(
avctx
,
AV_LOG_DEBUG
,
"format: %s
\n
"
,
format_str
);
switch
(
format
)
{
switch
(
format
)
{
case
MKTAG
(
' '
,
'R'
,
'G'
,
'B'
):
case
MKTAG
(
' '
,
'R'
,
'G'
,
'B'
):
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB0
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB0
;
...
...
libavcodec/utils.c
浏览文件 @
67e370ee
...
@@ -3256,12 +3256,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
...
@@ -3256,12 +3256,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
", %d reference frame%s"
,
", %d reference frame%s"
,
enc
->
refs
,
enc
->
refs
>
1
?
"s"
:
""
);
enc
->
refs
,
enc
->
refs
>
1
?
"s"
:
""
);
if
(
enc
->
codec_tag
)
{
if
(
enc
->
codec_tag
)
char
tag_buf
[
32
];
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
" (%s / 0x%04X)"
,
av_get_codec_tag_string
(
tag_buf
,
sizeof
(
tag_buf
),
enc
->
codec_tag
);
av_fourcc2str
(
enc
->
codec_tag
),
enc
->
codec_tag
);
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
" (%s / 0x%04X)"
,
tag_buf
,
enc
->
codec_tag
);
}
switch
(
enc
->
codec_type
)
{
switch
(
enc
->
codec_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
case
AVMEDIA_TYPE_VIDEO
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录