Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-12 Thread Chema Gonzalez
Hi Paul, I tried to understand the per-frame side-data (and metadata) mechanism. Adding my notes here in case they help a future reader. Metadata and side-data seem like similar mechanisms to add auxiliary information to each frame. Main difference seems to be that metadata is simpler (a

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-03 Thread Ronald S. Bultje
Hi Chema, On Fri, Sep 2, 2022 at 11:12 AM Chema Gonzalez wrote: > So is there a filter that already dumps this information? > Yes, it's called codecview. We can help understand how it works if you ask more specific questions, but something like "git grep EXPORT_DATA_MVS ../libavcodec/mpeg*.c"

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-03 Thread Paul B Mahol
On Sat, Sep 3, 2022 at 2:46 AM Chema Gonzalez wrote: > Hi again, > > On Fri, Sep 2, 2022 at 2:05 PM Paul B Mahol wrote: > > > > > So is there a filter that already dumps this information? > > > > Not in text but in visual, note that you can write own code that uses > > > > library to dump MV as

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Chema Gonzalez
Hi again, On Fri, Sep 2, 2022 at 2:05 PM Paul B Mahol wrote: > > > > So is there a filter that already dumps this information? > > > Not in text but in visual, note that you can write own code that uses > > > library to dump MV as text, because MV are exported when certain flag is > > > enabled.

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Paul B Mahol
On Fri, Sep 2, 2022 at 8:04 PM Chema Gonzalez wrote: > Hi again, > > On Fri, Sep 2, 2022 at 9:10 AM Paul B Mahol wrote: > > > > On Fri, Sep 2, 2022 at 5:12 PM Chema Gonzalez > wrote: > > > > > So is there a filter that already dumps this information? > > > > > > > Not in text but in visual,

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Chema Gonzalez
Hi again, On Fri, Sep 2, 2022 at 9:10 AM Paul B Mahol wrote: > > On Fri, Sep 2, 2022 at 5:12 PM Chema Gonzalez wrote: > > > So is there a filter that already dumps this information? > > > > Not in text but in visual, note that you can write own code that uses > library to dump MV as text,

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Paul B Mahol
On Fri, Sep 2, 2022 at 5:12 PM Chema Gonzalez wrote: > So is there a filter that already dumps this information? > Not in text but in visual, note that you can write own code that uses library to dump MV as text, because MV are exported when certain flag is enabled. > > Thanks, > -Chema > > On

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Chema Gonzalez
So is there a filter that already dumps this information? Thanks, -Chema On Fri, Sep 2, 2022 at 12:56 AM Paul B Mahol wrote: > > On Thu, Sep 1, 2022 at 8:43 PM Chema Gonzalez wrote: > > > Hi Paul, > > > > Can you please describe how you can get the MV values? > > > > See how filters do it.

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-02 Thread Paul B Mahol
On Thu, Sep 1, 2022 at 8:43 PM Chema Gonzalez wrote: > Hi Paul, > > Can you please describe how you can get the MV values? > See how filters do it. They visualize MV but using similar logic one could dump them to ton of texts. > > Thanks, > -Chema > > > On Thu, Sep 1, 2022 at 10:52 AM Paul B

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-01 Thread Chema Gonzalez
Hi Paul, Can you please describe how you can get the MV values? Thanks, -Chema On Thu, Sep 1, 2022 at 10:52 AM Paul B Mahol wrote: > > On Thu, Sep 1, 2022 at 5:06 PM Chema Gonzalez wrote: > > > Hi, > > > > All the other debug modes (qp, skip, mb_type) use the same approach. > > > > > This

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-01 Thread Paul B Mahol
On Thu, Sep 1, 2022 at 5:06 PM Chema Gonzalez wrote: > Hi, > > All the other debug modes (qp, skip, mb_type) use the same approach. > > This adds to much code for something that is already possible. > -Chema > > > On Thu, Sep 1, 2022 at 6:30 AM Ronald S. Bultje > wrote: > > > > Hi, > > > > On

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-01 Thread Chema Gonzalez
Hi, All the other debug modes (qp, skip, mb_type) use the same approach. -Chema On Thu, Sep 1, 2022 at 6:30 AM Ronald S. Bultje wrote: > > Hi, > > On Wed, Aug 31, 2022 at 7:10 PM Chema Gonzalez wrote: >> >> Add a new debug mode ("motion_vec") that prints the values of the >> motion vectors

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-01 Thread Ronald S. Bultje
Hi, On Wed, Aug 31, 2022 at 7:10 PM Chema Gonzalez wrote: > Add a new debug mode ("motion_vec") that prints the values of the > motion vectors (MV). > Isn't this super-hacky? In a well-designed system, a codec might export its MVs using designated structs (which we already have) and then use

[FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-08-31 Thread Chema Gonzalez
Add a new debug mode ("motion_vec") that prints the values of the motion vectors (MV). Note that, in order to give the same weight to MV from bigger blocks, we may print each MV pair more than once. Tested: ``` $ ./ffprobe -v quiet -show_frames -debug motion_vec /tmp/in.264 \ 2>&1

[FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-08-31 Thread Chema Gonzalez
Add a new debug mode ("motion_vec") that prints the values of the motion vectors (MV). Note that, in order to give the same weight to MV from bigger blocks, we may print each MV pair more than once. Tested: ``` $ ./ffprobe -v quiet -show_frames -debug motion_vec /tmp/in.264 2>&1 >/dev/null ...

[FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-08-31 Thread Chema Gonzalez
Add a new debug mode ("motion_vec") that prints the values of the motion vectors (MV). Note that, in order to give the same weight to MV from bigger blocks, we may print each MV pair more than once. Tested: ``` $ ./ffprobe -v quiet -show_frames -debug motion_vec /tmp/in.264 2>&1 >/dev/null ...

[FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-08-31 Thread Chema Gonzalez
Add a new debug mode ("motion_vec") that prints the values of the motion vectors (MV). Note that, in order to give the same weight to MV from bigger blocks, we may print each MV pair more than once. Tested: ``` $ ./ffprobe -v quiet -show_frames -debug motion_vec /tmp/in.264 2>&1 >/dev/null ...