From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 259AC4C68F
	for <ffmpegdev@gitmailbox.com>; Sun,  9 Mar 2025 19:01:44 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC25D68E6A7;
	Sun,  9 Mar 2025 21:01:41 +0200 (EET)
Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com
 [209.85.214.169])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED57968D161
 for <ffmpeg-devel@ffmpeg.org>; Sun,  9 Mar 2025 21:01:34 +0200 (EET)
Received: by mail-pl1-f169.google.com with SMTP id
 d9443c01a7336-22398e09e39so60804645ad.3
 for <ffmpeg-devel@ffmpeg.org>; Sun, 09 Mar 2025 12:01:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1741546893; x=1742151693; darn=ffmpeg.org;
 h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from
 :references:in-reply-to:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=MU4cBdN5lBvZUJJ5QrDJU6y2sNb8zVoo4+MMykd6XmQ=;
 b=kulh5rEfqHpq+RiQ9qVCAbbJAy4/aHIsLx4GFTvsYEiRcFHT3Lqu+ybuWxeGhztFpJ
 6mpbrWaGCImkgZh0RVkzIv3X4FNVHhaeIW2TCEbK1PaJUt+YQIf4gP9vWqFwmwKoK7XL
 EbUNcOSB6AyDjpXoXaiYG4uEH5bV0RFJV2HX4PRLTHQM9D1+VmB9YsIYfbgPNJ5SooQh
 mrhzbT72f5JQQ5xFQqijateH1AEwmKYm8zNyVCR9fMyaWia0TCISzH0kO7RMNc9MNlMx
 CDyhROzwoo9qOXpGMaZtBzxmFJZvaCGjvPv9YAA1AyTuq7VYpePHH+1cNIL2miaMdSov
 KX6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1741546893; x=1742151693;
 h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from
 :references:in-reply-to:message-id:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=MU4cBdN5lBvZUJJ5QrDJU6y2sNb8zVoo4+MMykd6XmQ=;
 b=TE53B50PEjCVECeDEfEwgvN7H8NCkflqQywcxcXxftT7tRocx2FPcUjUimIfgR9gia
 R4jWvBCq1WR4f4ZdoUBUL/sJbwv9g/2LFqjAVB+czC/tbGpPUznWzvDRnDeO9dObQu2q
 3D4LaRdsJgJ4RXL2eNEKXeXrXctsQjVfrlyssmCKH89tFROHcZoZw+5RXiWP6L7LMAQv
 +F7VUK9yPHSj2bt/Vn4YNNoYBPKWZy4BA0TZov15nkyA2Jax7mEv5dtrDA8bK9FCOAJ7
 q3zNAbrb7ZNYYfpsAOH6eW4Za6aYCfqF/IC1Gug2DUpWKGjAeIjxvTIsDX7ZoAL7xvbe
 F2Zg==
X-Gm-Message-State: AOJu0YyAjW34C3NgURw9UzxBxBQzBwmYD7x1vqqClnrRpkloEL/SyBNr
 vZ4AZWuOpHy90J6ijvb9LTDuvYAS66/lsXQZsJq4qPNt2w5YDrOQA+KruGoq
X-Gm-Gg: ASbGncv009+ULqTi7SIVu4Ab0ZYgG8/qS+nFQ8zr6ko6O7uJMI8+pDWQZ2q5uthE7ED
 xdNZWYF9jd7nOYsVMNri9t9F5urgsXELVbCMy1FLCmP297Z+/Hvn8UCI344YDjoBLquJXWt/kNU
 Y77mDXgS64wcBiSQ66gD8QItaz3NeTlMHtuCCYV7RRdERefKIofoRr1jdlHxGRa6VUcbCQt4UsI
 2zq+FbfPFL+XndcfiQYLR6Vhy+cGohVZ2n28ee1w84D78g0//oviOk9oNCwbweY/kwV7h3+BNrD
 lRLDbORNNU7+vOs3DCjhpBwEC6btiOO5T+PJIMwZCqW3xbG9BxGkXMcY1KzYZt0=
X-Google-Smtp-Source: AGHT+IFJQGvuV2M6BdPap9R4JvJJ0tQvWFXR7eHeNXuCBN3qNgoTsUSm+xDpeTSi78nrm6kdz4BSIA==
X-Received: by 2002:a05:6a00:2309:b0:736:55ec:ea8b with SMTP id
 d2e1a72fcca58-736aab2ca48mr16744253b3a.24.1741546893089; 
 Sun, 09 Mar 2025 12:01:33 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-736d8f0ea83sm582824b3a.143.2025.03.09.12.01.32
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 09 Mar 2025 12:01:32 -0700 (PDT)
Message-Id: <pull.59.v5.ffstaging.FFmpeg.1741546887.ffmpegagent@gmail.com>
In-Reply-To: <pull.59.v4.ffstaging.FFmpeg.1741474964.ffmpegagent@gmail.com>
References: <pull.59.v4.ffstaging.FFmpeg.1741474964.ffmpegagent@gmail.com>
From: ffmpegagent <ffmpegagent@gmail.com>
Date: Sun, 09 Mar 2025 19:01:22 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v5 0/5] avutil/log: Replace addresses in log
 output with simple ids
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: softworkz <softworkz@hotmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/pull.59.v5.ffstaging.FFmpeg.1741546887.ffmpegagent@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.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)


V3
==

 * Externalize the prefix formatting with a prefix_format callback


V4
==

 * Implement a custom logging callback function for fftools instead of the
   prefix formatting callback (as suggested by Hendrik Leppkes)


V5
==

 * Remove unused var
 * Add missing include to fix build error on PPC (thanks, Michael)

softworkz (5):
  avutil/log: Add AV_LOG_PRINT_MEMADDRESSES logging flag
  fftools/opt_common: add memaddresses log flag
  fftools: Provide a an fftools-specific logging callback function
  doc/fftools-common-opts: document memaddresses log flag
  Remove commented lines

 doc/APIchanges               |   3 +
 doc/fftools-common-opts.texi |   2 +
 fftools/Makefile             |   7 +-
 fftools/ffmpeg.c             |   2 +
 fftools/ffmpeg_filter.c      |   2 +-
 fftools/ffplay.c             |   2 +
 fftools/ffprobe.c            |   2 +
 fftools/fftools_log.c        | 478 +++++++++++++++++++++++++++++++++++
 fftools/fftools_log.h        |  44 ++++
 fftools/opt_common.c         |   6 +
 libavutil/log.h              |   5 +
 libavutil/version.h          |   2 +-
 12 files changed, 552 insertions(+), 3 deletions(-)
 create mode 100644 fftools/fftools_log.c
 create mode 100644 fftools/fftools_log.h


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

Range-diff vs v4:

 1:  4be966796c = 1:  4be966796c avutil/log: Add AV_LOG_PRINT_MEMADDRESSES logging flag
 2:  e4f8213c24 = 2:  e4f8213c24 fftools/opt_common: add memaddresses log flag
 3:  fa1ae9231a ! 3:  ba20f5b116 fftools: Provide a an fftools-specific logging callback function
     @@ fftools/fftools_log.c (new)
      +#include <stdio.h>
      +#include <stdlib.h>
      +#include <string.h>
     ++#include <time.h>
     ++
      +#include "libavutil/bprint.h"
      +#include "libavutil/common.h"
      +//#include "libavutil/internal.h"
     @@ fftools/fftools_log.c (new)
      +#define localtime_r ff_localtime_r
      +#endif
      +
     -+static int nb_class_ids;
     -+
     -+#define NB_CLASS_IDS 1000
     ++#define MAX_CLASS_IDS 1000
      +static struct class_ids {
      +    void *avcl;
      +    uint64_t class_hash;
      +    unsigned id;
     -+} class_ids[NB_CLASS_IDS];
     ++} class_ids[MAX_CLASS_IDS];
      +
      +static uint64_t fnv_hash(const char *str)
      +{
     @@ fftools/fftools_log.c (new)
      +    unsigned i, nb_ids = 0;
      +    uint64_t class_hash;
      +
     -+    for (i = 0; i < NB_CLASS_IDS && class_ids[i].avcl; i++) {
     ++    for (i = 0; i < MAX_CLASS_IDS && class_ids[i].avcl; i++) {
      +        if (class_ids[i].avcl == avcl)
      +            return class_ids[i].id;
      +    }
      +
      +    class_hash = fnv_hash(avc->class_name);
      +
     -+    for (i = 0; i < NB_CLASS_IDS; i++) {
     ++    for (i = 0; i < MAX_CLASS_IDS; i++) {
      +        if (class_ids[i].class_hash == class_hash)
      +            nb_ids++;
      +
     @@ fftools/fftools_log.c (new)
      +        }
      +    }
      +
     -+    // exceeded NB_CLASS_IDS entries in class_ids[]
     ++    // exceeded MAX_CLASS_IDS entries in class_ids[]
      +    return 0;
      +}
      +
 4:  68a9ee6fbe = 4:  f689a432df doc/fftools-common-opts: document memaddresses log flag
 -:  ---------- > 5:  9429d11516 Remove commented lines

-- 
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".