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
8a0954dd
Commit
8a0954dd
authored
Aug 25, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: add missing FF_API_DEBUG_MV wrappers
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
2c800eb7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
2 deletions
+15
-2
ffmpeg.c
ffmpeg.c
+5
-1
mpegpicture.c
libavcodec/mpegpicture.c
+4
-1
mpegvideo.c
libavcodec/mpegvideo.c
+2
-0
options_table.h
libavcodec/options_table.h
+2
-0
pthread_frame.c
libavcodec/pthread_frame.c
+2
-0
No files found.
ffmpeg.c
View file @
8a0954dd
...
@@ -3928,7 +3928,11 @@ static int check_keyboard_interaction(int64_t cur_time)
...
@@ -3928,7 +3928,11 @@ static int check_keyboard_interaction(int64_t cur_time)
if
(
key
==
'D'
)
{
if
(
key
==
'D'
)
{
debug
=
input_streams
[
0
]
->
st
->
codec
->
debug
<<
1
;
debug
=
input_streams
[
0
]
->
st
->
codec
->
debug
<<
1
;
if
(
!
debug
)
debug
=
1
;
if
(
!
debug
)
debug
=
1
;
while
(
debug
&
(
FF_DEBUG_DCT_COEFF
|
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
//unsupported, would just crash
while
(
debug
&
(
FF_DEBUG_DCT_COEFF
#if FF_API_DEBUG_MV
|
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
#endif
))
//unsupported, would just crash
debug
+=
debug
;
debug
+=
debug
;
}
else
{
}
else
{
char
buf
[
32
];
char
buf
[
32
];
...
...
libavcodec/mpegpicture.c
View file @
8a0954dd
...
@@ -202,7 +202,10 @@ static int alloc_picture_tables(AVCodecContext *avctx, Picture *pic, int encodin
...
@@ -202,7 +202,10 @@ static int alloc_picture_tables(AVCodecContext *avctx, Picture *pic, int encodin
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
}
if
(
out_format
==
FMT_H263
||
encoding
||
avctx
->
debug_mv
||
if
(
out_format
==
FMT_H263
||
encoding
||
#if FF_API_DEBUG_MV
avctx
->
debug_mv
||
#endif
(
avctx
->
flags2
&
AV_CODEC_FLAG2_EXPORT_MVS
))
{
(
avctx
->
flags2
&
AV_CODEC_FLAG2_EXPORT_MVS
))
{
int
mv_size
=
2
*
(
b8_array_size
+
4
)
*
sizeof
(
int16_t
);
int
mv_size
=
2
*
(
b8_array_size
+
4
)
*
sizeof
(
int16_t
);
int
ref_index_size
=
4
*
mb_array_size
;
int
ref_index_size
=
4
*
mb_array_size
;
...
...
libavcodec/mpegvideo.c
View file @
8a0954dd
...
@@ -1743,6 +1743,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
...
@@ -1743,6 +1743,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
}
}
}
}
#if FF_API_DEBUG_MV
if
((
avctx
->
debug
&
(
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
||
if
((
avctx
->
debug
&
(
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
||
(
avctx
->
debug_mv
))
{
(
avctx
->
debug_mv
))
{
int
mb_y
;
int
mb_y
;
...
@@ -1956,6 +1957,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
...
@@ -1956,6 +1957,7 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
}
}
}
}
}
}
#endif
}
}
void
ff_print_debug_info
(
MpegEncContext
*
s
,
Picture
*
p
,
AVFrame
*
pict
)
void
ff_print_debug_info
(
MpegEncContext
*
s
,
Picture
*
p
,
AVFrame
*
pict
)
...
...
libavcodec/options_table.h
View file @
8a0954dd
...
@@ -275,8 +275,10 @@ static const AVOption avcodec_options[] = {
...
@@ -275,8 +275,10 @@ static const AVOption avcodec_options[] = {
{
"er"
,
"error recognition"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_ER
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"er"
,
"error recognition"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_ER
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"mmco"
,
"memory management control operations (H.264)"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_MMCO
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"mmco"
,
"memory management control operations (H.264)"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_MMCO
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"bugs"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_BUGS
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"bugs"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_BUGS
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
#if FF_API_DEBUG_MV
{
"vis_qp"
,
"visualize quantization parameter (QP), lower QP are tinted greener"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_QP
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"vis_qp"
,
"visualize quantization parameter (QP), lower QP are tinted greener"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_QP
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"vis_mb_type"
,
"visualize block types"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_MB_TYPE
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"vis_mb_type"
,
"visualize block types"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_MB_TYPE
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
#endif
{
"buffers"
,
"picture buffer allocations"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_BUFFERS
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"buffers"
,
"picture buffer allocations"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_BUFFERS
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug"
},
{
"thread_ops"
,
"threading operations"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_THREADS
},
INT_MIN
,
INT_MAX
,
V
|
A
|
D
,
"debug"
},
{
"thread_ops"
,
"threading operations"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_THREADS
},
INT_MIN
,
INT_MAX
,
V
|
A
|
D
,
"debug"
},
{
"nomc"
,
"skip motion compensation"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_NOMC
},
INT_MIN
,
INT_MAX
,
V
|
A
|
D
,
"debug"
},
{
"nomc"
,
"skip motion compensation"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_NOMC
},
INT_MIN
,
INT_MAX
,
V
|
A
|
D
,
"debug"
},
...
...
libavcodec/pthread_frame.c
View file @
8a0954dd
...
@@ -739,8 +739,10 @@ int ff_frame_thread_init(AVCodecContext *avctx)
...
@@ -739,8 +739,10 @@ int ff_frame_thread_init(AVCodecContext *avctx)
if
(
!
thread_count
)
{
if
(
!
thread_count
)
{
int
nb_cpus
=
av_cpu_count
();
int
nb_cpus
=
av_cpu_count
();
#if FF_API_DEBUG_MV
if
((
avctx
->
debug
&
(
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
||
avctx
->
debug_mv
)
if
((
avctx
->
debug
&
(
FF_DEBUG_VIS_QP
|
FF_DEBUG_VIS_MB_TYPE
))
||
avctx
->
debug_mv
)
nb_cpus
=
1
;
nb_cpus
=
1
;
#endif
// use number of cores + 1 as thread count if there is more than one
// use number of cores + 1 as thread count if there is more than one
if
(
nb_cpus
>
1
)
if
(
nb_cpus
>
1
)
thread_count
=
avctx
->
thread_count
=
FFMIN
(
nb_cpus
+
1
,
MAX_AUTO_THREADS
);
thread_count
=
avctx
->
thread_count
=
FFMIN
(
nb_cpus
+
1
,
MAX_AUTO_THREADS
);
...
...
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