Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
eb5f8463
Commit
eb5f8463
authored
Oct 23, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: drop deprecated vismv option
Deprecated in 08/2014. Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
d2484639
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
249 deletions
+0
-249
codecs.texi
doc/codecs.texi
+0
-15
mpegvideo.c
libavcodec/mpegvideo.c
+0
-218
options_table.h
libavcodec/options_table.h
+0
-6
utils.c
libavcodec/utils.c
+0
-6
version.h
libavcodec/version.h
+0
-4
No files found.
doc/codecs.texi
View file @
eb5f8463
...
...
@@ -506,21 +506,6 @@ threading operations
skip motion compensation
@end table
@item vismv @var{integer} (@emph{decoding,video})
Visualize motion vectors (MVs).
This option is deprecated, see the codecview filter instead.
Possible values:
@table @samp
@item pf
forward predicted MVs of P-frames
@item bf
forward predicted MVs of B-frames
@item bb
backward predicted MVs of B-frames
@end table
@item cmp @var{integer} (@emph{encoding,video})
Set full pel me compare function.
...
...
libavcodec/mpegvideo.c
View file @
eb5f8463
...
...
@@ -1418,134 +1418,6 @@ void ff_mpv_frame_end(MpegEncContext *s)
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
tf
,
INT_MAX
,
0
);
}
#if FF_API_VISMV
static
int
clip_line
(
int
*
sx
,
int
*
sy
,
int
*
ex
,
int
*
ey
,
int
maxx
)
{
if
(
*
sx
>
*
ex
)
return
clip_line
(
ex
,
ey
,
sx
,
sy
,
maxx
);
if
(
*
sx
<
0
)
{
if
(
*
ex
<
0
)
return
1
;
*
sy
=
*
ey
+
(
*
sy
-
*
ey
)
*
(
int64_t
)
*
ex
/
(
*
ex
-
*
sx
);
*
sx
=
0
;
}
if
(
*
ex
>
maxx
)
{
if
(
*
sx
>
maxx
)
return
1
;
*
ey
=
*
sy
+
(
*
ey
-
*
sy
)
*
(
int64_t
)(
maxx
-
*
sx
)
/
(
*
ex
-
*
sx
);
*
ex
=
maxx
;
}
return
0
;
}
/**
* Draw a line from (ex, ey) -> (sx, sy).
* @param w width of the image
* @param h height of the image
* @param stride stride/linesize of the image
* @param color color of the arrow
*/
static
void
draw_line
(
uint8_t
*
buf
,
int
sx
,
int
sy
,
int
ex
,
int
ey
,
int
w
,
int
h
,
int
stride
,
int
color
)
{
int
x
,
y
,
fr
,
f
;
if
(
clip_line
(
&
sx
,
&
sy
,
&
ex
,
&
ey
,
w
-
1
))
return
;
if
(
clip_line
(
&
sy
,
&
sx
,
&
ey
,
&
ex
,
h
-
1
))
return
;
sx
=
av_clip
(
sx
,
0
,
w
-
1
);
sy
=
av_clip
(
sy
,
0
,
h
-
1
);
ex
=
av_clip
(
ex
,
0
,
w
-
1
);
ey
=
av_clip
(
ey
,
0
,
h
-
1
);
buf
[
sy
*
stride
+
sx
]
+=
color
;
if
(
FFABS
(
ex
-
sx
)
>
FFABS
(
ey
-
sy
))
{
if
(
sx
>
ex
)
{
FFSWAP
(
int
,
sx
,
ex
);
FFSWAP
(
int
,
sy
,
ey
);
}
buf
+=
sx
+
sy
*
stride
;
ex
-=
sx
;
f
=
((
ey
-
sy
)
<<
16
)
/
ex
;
for
(
x
=
0
;
x
<=
ex
;
x
++
)
{
y
=
(
x
*
f
)
>>
16
;
fr
=
(
x
*
f
)
&
0xFFFF
;
buf
[
y
*
stride
+
x
]
+=
(
color
*
(
0x10000
-
fr
))
>>
16
;
if
(
fr
)
buf
[(
y
+
1
)
*
stride
+
x
]
+=
(
color
*
fr
)
>>
16
;
}
}
else
{
if
(
sy
>
ey
)
{
FFSWAP
(
int
,
sx
,
ex
);
FFSWAP
(
int
,
sy
,
ey
);
}
buf
+=
sx
+
sy
*
stride
;
ey
-=
sy
;
if
(
ey
)
f
=
((
ex
-
sx
)
<<
16
)
/
ey
;
else
f
=
0
;
for
(
y
=
0
;
y
<=
ey
;
y
++
){
x
=
(
y
*
f
)
>>
16
;
fr
=
(
y
*
f
)
&
0xFFFF
;
buf
[
y
*
stride
+
x
]
+=
(
color
*
(
0x10000
-
fr
))
>>
16
;
if
(
fr
)
buf
[
y
*
stride
+
x
+
1
]
+=
(
color
*
fr
)
>>
16
;
}
}
}
/**
* Draw an arrow from (ex, ey) -> (sx, sy).
* @param w width of the image
* @param h height of the image
* @param stride stride/linesize of the image
* @param color color of the arrow
*/
static
void
draw_arrow
(
uint8_t
*
buf
,
int
sx
,
int
sy
,
int
ex
,
int
ey
,
int
w
,
int
h
,
int
stride
,
int
color
,
int
tail
,
int
direction
)
{
int
dx
,
dy
;
if
(
direction
)
{
FFSWAP
(
int
,
sx
,
ex
);
FFSWAP
(
int
,
sy
,
ey
);
}
sx
=
av_clip
(
sx
,
-
100
,
w
+
100
);
sy
=
av_clip
(
sy
,
-
100
,
h
+
100
);
ex
=
av_clip
(
ex
,
-
100
,
w
+
100
);
ey
=
av_clip
(
ey
,
-
100
,
h
+
100
);
dx
=
ex
-
sx
;
dy
=
ey
-
sy
;
if
(
dx
*
dx
+
dy
*
dy
>
3
*
3
)
{
int
rx
=
dx
+
dy
;
int
ry
=
-
dx
+
dy
;
int
length
=
ff_sqrt
((
rx
*
rx
+
ry
*
ry
)
<<
8
);
// FIXME subpixel accuracy
rx
=
ROUNDED_DIV
(
rx
*
3
<<
4
,
length
);
ry
=
ROUNDED_DIV
(
ry
*
3
<<
4
,
length
);
if
(
tail
)
{
rx
=
-
rx
;
ry
=
-
ry
;
}
draw_line
(
buf
,
sx
,
sy
,
sx
+
rx
,
sy
+
ry
,
w
,
h
,
stride
,
color
);
draw_line
(
buf
,
sx
,
sy
,
sx
-
ry
,
sy
+
rx
,
w
,
h
,
stride
,
color
);
}
draw_line
(
buf
,
sx
,
sy
,
ex
,
ey
,
w
,
h
,
stride
,
color
);
}
#endif
static
int
add_mb
(
AVMotionVector
*
mb
,
uint32_t
mb_type
,
int
dst_x
,
int
dst_y
,
int
motion_x
,
int
motion_y
,
int
motion_scale
,
...
...
@@ -1737,12 +1609,6 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
int
mb_y
;
int
i
;
int
h_chroma_shift
,
v_chroma_shift
,
block_height
;
#if FF_API_VISMV
const
int
shift
=
1
+
quarter_sample
;
uint8_t
*
ptr
;
const
int
width
=
avctx
->
width
;
const
int
height
=
avctx
->
height
;
#endif
const
int
mv_sample_log2
=
avctx
->
codec_id
==
AV_CODEC_ID_H264
||
avctx
->
codec_id
==
AV_CODEC_ID_SVQ3
?
2
:
1
;
const
int
mv_stride
=
(
mb_width
<<
mv_sample_log2
)
+
(
avctx
->
codec
->
id
==
AV_CODEC_ID_H264
?
0
:
1
);
...
...
@@ -1755,96 +1621,12 @@ void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_
av_frame_make_writable
(
pict
);
pict
->
opaque
=
NULL
;
#if FF_API_VISMV
ptr
=
pict
->
data
[
0
];
#endif
block_height
=
16
>>
v_chroma_shift
;
for
(
mb_y
=
0
;
mb_y
<
mb_height
;
mb_y
++
)
{
int
mb_x
;
for
(
mb_x
=
0
;
mb_x
<
mb_width
;
mb_x
++
)
{
const
int
mb_index
=
mb_x
+
mb_y
*
mb_stride
;
#if FF_API_VISMV
if
((
avctx
->
debug_mv
)
&&
motion_val
[
0
])
{
int
type
;
for
(
type
=
0
;
type
<
3
;
type
++
)
{
int
direction
=
0
;
switch
(
type
)
{
case
0
:
if
((
!
(
avctx
->
debug_mv
&
FF_DEBUG_VIS_MV_P_FOR
))
||
(
pict
->
pict_type
!=
AV_PICTURE_TYPE_P
))
continue
;
direction
=
0
;
break
;
case
1
:
if
((
!
(
avctx
->
debug_mv
&
FF_DEBUG_VIS_MV_B_FOR
))
||
(
pict
->
pict_type
!=
AV_PICTURE_TYPE_B
))
continue
;
direction
=
0
;
break
;
case
2
:
if
((
!
(
avctx
->
debug_mv
&
FF_DEBUG_VIS_MV_B_BACK
))
||
(
pict
->
pict_type
!=
AV_PICTURE_TYPE_B
))
continue
;
direction
=
1
;
break
;
}
if
(
!
USES_LIST
(
mbtype_table
[
mb_index
],
direction
))
continue
;
if
(
IS_8X8
(
mbtype_table
[
mb_index
]))
{
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
sx
=
mb_x
*
16
+
4
+
8
*
(
i
&
1
);
int
sy
=
mb_y
*
16
+
4
+
8
*
(
i
>>
1
);
int
xy
=
(
mb_x
*
2
+
(
i
&
1
)
+
(
mb_y
*
2
+
(
i
>>
1
))
*
mv_stride
)
<<
(
mv_sample_log2
-
1
);
int
mx
=
(
motion_val
[
direction
][
xy
][
0
]
>>
shift
)
+
sx
;
int
my
=
(
motion_val
[
direction
][
xy
][
1
]
>>
shift
)
+
sy
;
draw_arrow
(
ptr
,
sx
,
sy
,
mx
,
my
,
width
,
height
,
pict
->
linesize
[
0
],
100
,
0
,
direction
);
}
}
else
if
(
IS_16X8
(
mbtype_table
[
mb_index
]))
{
int
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
int
sx
=
mb_x
*
16
+
8
;
int
sy
=
mb_y
*
16
+
4
+
8
*
i
;
int
xy
=
(
mb_x
*
2
+
(
mb_y
*
2
+
i
)
*
mv_stride
)
<<
(
mv_sample_log2
-
1
);
int
mx
=
(
motion_val
[
direction
][
xy
][
0
]
>>
shift
);
int
my
=
(
motion_val
[
direction
][
xy
][
1
]
>>
shift
);
if
(
IS_INTERLACED
(
mbtype_table
[
mb_index
]))
my
*=
2
;
draw_arrow
(
ptr
,
sx
,
sy
,
mx
+
sx
,
my
+
sy
,
width
,
height
,
pict
->
linesize
[
0
],
100
,
0
,
direction
);
}
}
else
if
(
IS_8X16
(
mbtype_table
[
mb_index
]))
{
int
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
int
sx
=
mb_x
*
16
+
4
+
8
*
i
;
int
sy
=
mb_y
*
16
+
8
;
int
xy
=
(
mb_x
*
2
+
i
+
mb_y
*
2
*
mv_stride
)
<<
(
mv_sample_log2
-
1
);
int
mx
=
motion_val
[
direction
][
xy
][
0
]
>>
shift
;
int
my
=
motion_val
[
direction
][
xy
][
1
]
>>
shift
;
if
(
IS_INTERLACED
(
mbtype_table
[
mb_index
]))
my
*=
2
;
draw_arrow
(
ptr
,
sx
,
sy
,
mx
+
sx
,
my
+
sy
,
width
,
height
,
pict
->
linesize
[
0
],
100
,
0
,
direction
);
}
}
else
{
int
sx
=
mb_x
*
16
+
8
;
int
sy
=
mb_y
*
16
+
8
;
int
xy
=
(
mb_x
+
mb_y
*
mv_stride
)
<<
mv_sample_log2
;
int
mx
=
(
motion_val
[
direction
][
xy
][
0
]
>>
shift
)
+
sx
;
int
my
=
(
motion_val
[
direction
][
xy
][
1
]
>>
shift
)
+
sy
;
draw_arrow
(
ptr
,
sx
,
sy
,
mx
,
my
,
width
,
height
,
pict
->
linesize
[
0
],
100
,
0
,
direction
);
}
}
}
#endif
if
((
avctx
->
debug
&
FF_DEBUG_VIS_QP
))
{
uint64_t
c
=
(
qscale_table
[
mb_index
]
*
128
/
31
)
*
0x0101010101010101ULL
;
...
...
libavcodec/options_table.h
View file @
eb5f8463
...
...
@@ -249,12 +249,6 @@ static const AVOption avcodec_options[] = {
{
"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"
},
{
"nomc"
,
"skip motion compensation"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_NOMC
},
INT_MIN
,
INT_MAX
,
V
|
A
|
D
,
"debug"
},
#if FF_API_VISMV
{
"vismv"
,
"visualize motion vectors (MVs) (deprecated)"
,
OFFSET
(
debug_mv
),
AV_OPT_TYPE_FLAGS
,
{.
i64
=
DEFAULT
},
0
,
INT_MAX
,
V
|
D
,
"debug_mv"
},
{
"pf"
,
"forward predicted MVs of P-frames"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_MV_P_FOR
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug_mv"
},
{
"bf"
,
"forward predicted MVs of B-frames"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_MV_B_FOR
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug_mv"
},
{
"bb"
,
"backward predicted MVs of B-frames"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FF_DEBUG_VIS_MV_B_BACK
},
INT_MIN
,
INT_MAX
,
V
|
D
,
"debug_mv"
},
#endif
{
"cmp"
,
"full-pel ME compare function"
,
OFFSET
(
me_cmp
),
AV_OPT_TYPE_INT
,
{.
i64
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"cmp_func"
},
{
"subcmp"
,
"sub-pel ME compare function"
,
OFFSET
(
me_sub_cmp
),
AV_OPT_TYPE_INT
,
{.
i64
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"cmp_func"
},
{
"mbcmp"
,
"macroblock compare function"
,
OFFSET
(
mb_cmp
),
AV_OPT_TYPE_INT
,
{.
i64
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"cmp_func"
},
...
...
libavcodec/utils.c
View file @
eb5f8463
...
...
@@ -816,12 +816,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
avctx
->
lowres
=
avctx
->
codec
->
max_lowres
;
}
#if FF_API_VISMV
if
(
avctx
->
debug_mv
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"The 'vismv' option is deprecated, "
"see the codecview filter instead.
\n
"
);
#endif
if
(
av_codec_is_encoder
(
avctx
->
codec
))
{
int
i
;
#if FF_API_CODED_FRAME
...
...
libavcodec/version.h
View file @
eb5f8463
...
...
@@ -57,10 +57,6 @@
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_VISMV
/* XXX: don't forget to drop the -vismv documentation */
#define FF_API_VISMV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_VAAPI_CONTEXT
#define FF_API_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
...
...
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