Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: ffmpegagent <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: softworkz <softworkz@hotmail.com>,
	Soft Works <softworkz-at-hotmail.com@ffmpeg.org>,
	Nicolas George <george@nsup.org>, Gyan Doshi <ffmpeg@gyani.pro>
Subject: [FFmpeg-devel] [PATCH v2 0/3] avutil/log: Replace addresses in log output with simple ids
Date: Wed, 05 Mar 2025 18:19:40 +0000
Message-ID: <pull.59.v2.ffstaging.FFmpeg.1741198783.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.59.ffstaging.FFmpeg.1741189106311.ffmpegagent@gmail.com>

..and individual numbering. The benefits are:

 * Smaller log file sizes
 * The disambiguation is much easier to recognize and to follow
 * It eventually allows comparing and viewing log file diffs without almost
   every line being different due to those addresses


Before
======

[hevc @ 0000018e72a89cc0] nal_unit_type:
[hevc @ 0000018e72a89cc0] Decoding PPS
[hevc @ 0000018e72a89cc0] nal_unit_type: 39(SEI_P.. [hevc @
0000018e72a89cc0] Decoding SEI
[mp4 @ 0000018e72a8e240] All [mp4 @ 0000018e72a8e240] Afte [hevc @
0000018e742f6b40] Decoded frame with POC .. detected 16 logical cores
[Parsed_scale_0 @ 0000018e74382f40] Setting 'w' t.. [Parsed_scale_0 @
0000018e74382f40] Setting 'h' t.. [Parsed_scale_1 @ 0000018e74382440]
Setting 'w' t.. [mjpeg @ 0000018e743210c0] Forcing thread count t.. [mjpeg @
0000018e743210c0] intra_quant_bias = 96


After
=====

[hevc #0] nal_unit_type: [hevc #0] Decoding PPS
[hevc #0] nal_unit_type: 39(SEI_P.. [hevc #0] Decoding SEI
[mp4 #0] All info found
[mp4 #0] After avformat_find_ [hevc #1] Decoded frame with POC 2.
[Parsed_scale_0 #0] Setting 'w' t.. [Parsed_scale_0 #0] Setting 'h' t..
[Parsed_scale_1 #1] Setting 'w' t.. [mjpeg #2] Forcing thread count t..
[mjpeg #2] intra_quant_bias = 96


Versions
========


V2
==

 * Added log flag for optionally restoring the previous behavior (as
   requested by Gyan)

softworkz (3):
  avutil/log: Replace addresses in log output with simple ids
  fftools/opt_common: add memaddresses log flag
  doc/fftools-common-opts: document memaddresses log flag

 doc/APIchanges               |  3 ++
 doc/fftools-common-opts.texi |  2 ++
 fftools/opt_common.c         |  6 ++++
 libavutil/log.c              | 68 ++++++++++++++++++++++++++++++++----
 libavutil/log.h              |  5 +++
 libavutil/version.h          |  2 +-
 6 files changed, 79 insertions(+), 7 deletions(-)


base-commit: 5c5be37daff4f4ecbe0c20d6a9f0fdad6eadc9c8
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-59%2Fsoftworkz%2Fsubmit_logaddresses-v2
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-59/softworkz/submit_logaddresses-v2
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/59

Range-diff vs v1:

 1:  e686825b2a ! 1:  3a289533a7 avutil/log: Replace addresses in log output with simple ids
     @@ Commit message
      
          Signed-off-by: softworkz <softworkz@hotmail.com>
      
     + ## doc/APIchanges ##
     +@@
     + The last version increases of all libraries were on 2024-03-07
     + 
     ++2025-03-xx - xxxxxxxxxx - lavu 59.59.100 - log.h
     ++  Add flag AV_LOG_PRINT_MEMADDRESSES.
     ++
     + API changes, most recent first:
     + 
     + 2025-03-01 - xxxxxxxxxx - lavu 59.58.100 - pixfmt.h
     +
       ## libavutil/log.c ##
      @@ libavutil/log.c: static AVMutex mutex = AV_MUTEX_INITIALIZER;
       
     @@ libavutil/log.c: static AVMutex mutex = AV_MUTEX_INITIALIZER;
       #define NB_LEVELS 8
       #if defined(_WIN32) && HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
      @@ libavutil/log.c: static void format_line(void *avcl, int level, const char *fmt, va_list vl,
     -             AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) +
     -                                    avc->parent_log_context_offset);
     + 
     +     if(type) type[0] = type[1] = AV_CLASS_CATEGORY_NA + 16;
     +     if (*print_prefix && avc) {
     ++        const int print_mem = flags & AV_LOG_PRINT_MEMADDRESSES;
     ++
     +         if (avc->parent_log_context_offset) {
     +-            AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) +
     +-                                   avc->parent_log_context_offset);
     ++            AVClass** parent = *(AVClass ***) ((uint8_t *)avcl + avc->parent_log_context_offset);
                   if (parent && *parent) {
      -                av_bprintf(part+0, "[%s @ %p] ",
      -                           item_name(parent, *parent), parent);
     -+                av_bprintf(part+0, "[%s #%u] ",
     -+                           item_name(parent, *parent), get_class_id(parent));
     ++                if (print_mem)
     ++                    av_bprintf(part+0, "[%s @ %p] ", item_name(parent, *parent), parent);
     ++                else
     ++                    av_bprintf(part+0, "[%s #%u] ", item_name(parent, *parent), get_class_id(parent));
     ++
                       if(type) type[0] = get_category(parent);
                   }
               }
      -        av_bprintf(part+1, "[%s @ %p] ",
      -                   item_name(avcl, avc), avcl);
     -+        av_bprintf(part+1, "[%s #%u] ",
     -+                   item_name(avcl, avc), get_class_id(avcl));
     ++        if (print_mem)
     ++            av_bprintf(part+1, "[%s @ %p] ", item_name(avcl, avc), avcl);
     ++        else
     ++            av_bprintf(part+1, "[%s #%u] ", item_name(avcl, avc), get_class_id(avcl));
     ++
               if(type) type[1] = get_category(avcl);
           }
       
     +
     + ## libavutil/log.h ##
     +@@ libavutil/log.h: int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
     +  */
     + #define AV_LOG_PRINT_DATETIME 8
     + 
     ++/**
     ++ * Print memory addresses instead of logical ids in the AVClass prefix.
     ++ */
     ++#define AV_LOG_PRINT_MEMADDRESSES 16
     ++
     + void av_log_set_flags(int arg);
     + int av_log_get_flags(void);
     + 
     +
     + ## libavutil/version.h ##
     +@@
     +  */
     + 
     + #define LIBAVUTIL_VERSION_MAJOR  59
     +-#define LIBAVUTIL_VERSION_MINOR  58
     ++#define LIBAVUTIL_VERSION_MINOR  59
     + #define LIBAVUTIL_VERSION_MICRO 100
     + 
     + #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
 -:  ---------- > 2:  858e2cca9c fftools/opt_common: add memaddresses log flag
 -:  ---------- > 3:  411c77bdeb doc/fftools-common-opts: document memaddresses log flag

-- 
ffmpeg-codebot
_______________________________________________
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".

  parent reply	other threads:[~2025-03-05 18:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 15:38 [FFmpeg-devel] [PATCH] " softworkz
2025-03-05 15:40 ` Nicolas George
2025-03-05 15:45   ` Soft Works
2025-03-05 15:48   ` Soft Works
2025-03-05 15:42 ` Soft Works
2025-03-05 16:23 ` Gyan Doshi
2025-03-05 16:30   ` Soft Works
2025-03-05 17:14     ` Gyan Doshi
2025-03-05 18:19 ` ffmpegagent [this message]
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 1/3] " softworkz
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 2/3] fftools/opt_common: add memaddresses log flag softworkz
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 3/3] doc/fftools-common-opts: document " softworkz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.59.v2.ffstaging.FFmpeg.1741198783.ffmpegagent@gmail.com \
    --to=ffmpegagent@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=ffmpeg@gyani.pro \
    --cc=george@nsup.org \
    --cc=softworkz-at-hotmail.com@ffmpeg.org \
    --cc=softworkz@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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