Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information
@ 2022-09-12 23:49 Chema Gonzalez
  2022-09-23  3:23 ` Chema Gonzalez
  2022-09-23 17:50 ` Michael Niedermayer
  0 siblings, 2 replies; 3+ messages in thread
From: Chema Gonzalez @ 2022-09-12 23:49 UTC (permalink / raw)
  To: ffmpeg-devel, u, rsbultje; +Cc: Chema Gonzalez

Note that the motion information includes subpel motion information

This was likely forgotten in 56bdf61baa04c4fd8d165f34499115ce0aa97c43.

Tested:
```
$ make examples -j
...
$ doc/examples/extract_mvs in.264 | head -40 | \
    csvcut -C framenum,source,flags |csvlook
| blockw | blockh |  srcx | srcy |  dstx | dsty | motion_x | motion_y | motion_scale |
| ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ |
|     16 |     16 |    20 |   26 |     8 |    8 |       49 |       72 |            4 |
|     16 |     16 |   152 |   15 |   136 |    8 |       65 |       28 |            4 |
|     16 |      8 |   360 |    3 |   360 |    4 |        1 |       -6 |            4 |
|     16 |      8 |   360 |   13 |   360 |   12 |       -1 |        4 |            4 |
|     16 |     16 |   440 |   10 |   440 |    8 |        3 |       10 |            4 |
|      8 |     16 |   829 |    7 |   836 |    8 |      -31 |       -6 |            4 |
|      8 |     16 |   844 |    7 |   844 |    8 |       -1 |       -4 |            4 |
|     16 |     16 | 1,004 |   14 | 1,048 |    8 |     -177 |       24 |            4 |
|     16 |     16 | 1,096 |    8 | 1,096 |    8 |       -1 |        0 |            4 |
|     16 |      8 | 1,417 |   24 | 1,416 |    4 |        7 |       82 |            4 |
|     16 |      8 | 1,416 |   13 | 1,416 |   12 |        0 |        6 |            4 |
|     16 |      8 |    87 |   20 |    88 |   20 |       -7 |        0 |            4 |
|     16 |      8 |    99 |   44 |    88 |   28 |       45 |       66 |            4 |
...
```

Also:
```
$ make fate -j
...
```
---
 doc/examples/extract_mvs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c
index cc1311da91..b80ba26bb7 100644
--- a/doc/examples/extract_mvs.c
+++ b/doc/examples/extract_mvs.c
@@ -61,10 +61,11 @@ 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];
-                    printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
+                    printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64",%4d,%4d,%4d\n",
                         video_frame_count, mv->source,
                         mv->w, mv->h, mv->src_x, mv->src_y,
-                        mv->dst_x, mv->dst_y, mv->flags);
+                        mv->dst_x, mv->dst_y, mv->flags,
+                        mv->motion_x, mv->motion_y, mv->motion_scale);
                 }
             }
             av_frame_unref(frame);
@@ -166,7 +167,7 @@ int main(int argc, char **argv)
         goto end;
     }
 
-    printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags\n");
+    printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags,motion_x,motion_y,motion_scale\n");
 
     /* read frames from the file */
     while (av_read_frame(fmt_ctx, pkt) >= 0) {
-- 
2.37.3

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information
  2022-09-12 23:49 [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information Chema Gonzalez
@ 2022-09-23  3:23 ` Chema Gonzalez
  2022-09-23 17:50 ` Michael Niedermayer
  1 sibling, 0 replies; 3+ messages in thread
From: Chema Gonzalez @ 2022-09-23  3:23 UTC (permalink / raw)
  To: ffmpeg-devel, u, rsbultje

ping

-Chema

On Mon, Sep 12, 2022 at 4:50 PM Chema Gonzalez <chemag@gmail.com> wrote:
>
> Note that the motion information includes subpel motion information
>
> This was likely forgotten in 56bdf61baa04c4fd8d165f34499115ce0aa97c43.
>
> Tested:
> ```
> $ make examples -j
> ...
> $ doc/examples/extract_mvs in.264 | head -40 | \
>     csvcut -C framenum,source,flags |csvlook
> | blockw | blockh |  srcx | srcy |  dstx | dsty | motion_x | motion_y | motion_scale |
> | ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ |
> |     16 |     16 |    20 |   26 |     8 |    8 |       49 |       72 |            4 |
> |     16 |     16 |   152 |   15 |   136 |    8 |       65 |       28 |            4 |
> |     16 |      8 |   360 |    3 |   360 |    4 |        1 |       -6 |            4 |
> |     16 |      8 |   360 |   13 |   360 |   12 |       -1 |        4 |            4 |
> |     16 |     16 |   440 |   10 |   440 |    8 |        3 |       10 |            4 |
> |      8 |     16 |   829 |    7 |   836 |    8 |      -31 |       -6 |            4 |
> |      8 |     16 |   844 |    7 |   844 |    8 |       -1 |       -4 |            4 |
> |     16 |     16 | 1,004 |   14 | 1,048 |    8 |     -177 |       24 |            4 |
> |     16 |     16 | 1,096 |    8 | 1,096 |    8 |       -1 |        0 |            4 |
> |     16 |      8 | 1,417 |   24 | 1,416 |    4 |        7 |       82 |            4 |
> |     16 |      8 | 1,416 |   13 | 1,416 |   12 |        0 |        6 |            4 |
> |     16 |      8 |    87 |   20 |    88 |   20 |       -7 |        0 |            4 |
> |     16 |      8 |    99 |   44 |    88 |   28 |       45 |       66 |            4 |
> ...
> ```
>
> Also:
> ```
> $ make fate -j
> ...
> ```
> ---
>  doc/examples/extract_mvs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c
> index cc1311da91..b80ba26bb7 100644
> --- a/doc/examples/extract_mvs.c
> +++ b/doc/examples/extract_mvs.c
> @@ -61,10 +61,11 @@ 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];
> -                    printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
> +                    printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64",%4d,%4d,%4d\n",
>                          video_frame_count, mv->source,
>                          mv->w, mv->h, mv->src_x, mv->src_y,
> -                        mv->dst_x, mv->dst_y, mv->flags);
> +                        mv->dst_x, mv->dst_y, mv->flags,
> +                        mv->motion_x, mv->motion_y, mv->motion_scale);
>                  }
>              }
>              av_frame_unref(frame);
> @@ -166,7 +167,7 @@ int main(int argc, char **argv)
>          goto end;
>      }
>
> -    printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags\n");
> +    printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags,motion_x,motion_y,motion_scale\n");
>
>      /* read frames from the file */
>      while (av_read_frame(fmt_ctx, pkt) >= 0) {
> --
> 2.37.3
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information
  2022-09-12 23:49 [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information Chema Gonzalez
  2022-09-23  3:23 ` Chema Gonzalez
@ 2022-09-23 17:50 ` Michael Niedermayer
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2022-09-23 17:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 2134 bytes --]

On Mon, Sep 12, 2022 at 04:49:56PM -0700, Chema Gonzalez wrote:
> Note that the motion information includes subpel motion information
> 
> This was likely forgotten in 56bdf61baa04c4fd8d165f34499115ce0aa97c43.
> 
> Tested:
> ```
> $ make examples -j
> ...
> $ doc/examples/extract_mvs in.264 | head -40 | \
>     csvcut -C framenum,source,flags |csvlook
> | blockw | blockh |  srcx | srcy |  dstx | dsty | motion_x | motion_y | motion_scale |
> | ------ | ------ | ----- | ---- | ----- | ---- | -------- | -------- | ------------ |
> |     16 |     16 |    20 |   26 |     8 |    8 |       49 |       72 |            4 |
> |     16 |     16 |   152 |   15 |   136 |    8 |       65 |       28 |            4 |
> |     16 |      8 |   360 |    3 |   360 |    4 |        1 |       -6 |            4 |
> |     16 |      8 |   360 |   13 |   360 |   12 |       -1 |        4 |            4 |
> |     16 |     16 |   440 |   10 |   440 |    8 |        3 |       10 |            4 |
> |      8 |     16 |   829 |    7 |   836 |    8 |      -31 |       -6 |            4 |
> |      8 |     16 |   844 |    7 |   844 |    8 |       -1 |       -4 |            4 |
> |     16 |     16 | 1,004 |   14 | 1,048 |    8 |     -177 |       24 |            4 |
> |     16 |     16 | 1,096 |    8 | 1,096 |    8 |       -1 |        0 |            4 |
> |     16 |      8 | 1,417 |   24 | 1,416 |    4 |        7 |       82 |            4 |
> |     16 |      8 | 1,416 |   13 | 1,416 |   12 |        0 |        6 |            4 |
> |     16 |      8 |    87 |   20 |    88 |   20 |       -7 |        0 |            4 |
> |     16 |      8 |    99 |   44 |    88 |   28 |       45 |       66 |            4 |
> ...
> ```
> 
> Also:
> ```
> $ make fate -j
> ...
> ```
> ---
>  doc/examples/extract_mvs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-23 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 23:49 [FFmpeg-devel] [PATCH] doc/examples/extract_mvs: add motion information Chema Gonzalez
2022-09-23  3:23 ` Chema Gonzalez
2022-09-23 17:50 ` Michael Niedermayer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git