[FFmpeg-devel] [PATCH v4] examples/extract_mvs.c: dont disply motionless vectors
numberwolf
porschegt23 at foxmail.com
Wed Mar 25 16:25:00 EET 2020
Numberwolf:
>Reviewed-by: Paul B Mahol <onemda at gmail.com>
>Signed-off-by: numberwolf <porschegt23 at foxmail.com>
>---
>
>
>Here, don't need show motionless vectors,because they're useless.
>And remove comments.
> doc/examples/extract_mvs.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c
>index de31ccd..af62e02 100644
>--- a/doc/examples/extract_mvs.c
>+++ b/doc/examples/extract_mvs.c
>@@ -60,6 +60,9 @@ static int decode_packet(const AVPacket *pkt)
> const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
> for (i = 0; i < sd->size / sizeof(*mvs); i++) {
> const AVMotionVector *mv = &mvs[i];
>+ if (mv->src_x == mv->dst_x && mv->src_y == mv->dst_y) {
>+ continue;
>+ }
> printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
> video_frame_count, mv->source,
> mv->w, mv->h, mv->src_x, mv->src_y,
>--
>2.17.2 (Apple Git-113)
>
>Thanks
>Numberwolf
>
ping
Thanks
More information about the ffmpeg-devel
mailing list