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] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values
       [not found] <CAPge7yennCQdYPreeoO22rQ2QiKgtLbGDSCmddEJMgJJAOXw6g@mail.gmail.com>
@ 2024-01-29  7:54 ` 王昊然
  2024-01-31 23:23   ` Stefano Sabatini
  0 siblings, 1 reply; 2+ messages in thread
From: 王昊然 @ 2024-01-29  7:54 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: whr

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Fix bug #10501

Signed-off-by: WHR <msl0000023508@gmail.com>
---
 fftools/ffmpeg.c     | 4 ++--
 fftools/ffmpeg_enc.c | 2 +-
 fftools/ffmpeg_mux.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

[-- Attachment #2: ffmpeg-use-binary-unit-prefix-in-ffmpeg.diff --]
[-- Type: text/plain, Size: 2325 bytes --]

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 53df200d1ab..035210a8e90 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -329,7 +329,7 @@ static void ffmpeg_cleanup(int ret)
 
     if (do_benchmark) {
         int maxrss = getmaxrss() / 1024;
-        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
+        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%iKiB\n", maxrss);
     }
 
     for (i = 0; i < nb_filtergraphs; i++)
@@ -570,7 +570,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
     speed   = pts != AV_NOPTS_VALUE && t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1;
 
     if (total_size < 0) av_bprintf(&buf, "size=N/A time=");
-    else                av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0);
+    else                av_bprintf(&buf, "size=%8.0fKiB time=", total_size / 1024.0);
     if (pts == AV_NOPTS_VALUE) {
         av_bprintf(&buf, "N/A ");
     } else {
diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 2a7fba0c51f..bc0d3a334d7 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -612,7 +612,7 @@ static int update_video_stats(OutputStream *ost, const AVPacket *pkt, int write_
 
     bitrate     = (pkt->size * 8) / av_q2d(enc->time_base) / 1000.0;
     avg_bitrate = (double)(e->data_size * 8) / ti1 / 1000.0;
-    fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
+    fprintf(vstats_file, "s_size= %8.0fKiB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
            (double)e->data_size / 1024, ti1, bitrate, avg_bitrate);
     fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(pict_type));
 
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index ab86abee14f..ee708267c1e 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -725,8 +725,8 @@ static void mux_final_stats(Muxer *mux)
     }
 
     av_log(of, AV_LOG_INFO,
-           "video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB "
-           "global headers:%1.0fkB muxing overhead: %s\n",
+           "video:%1.0fKiB audio:%1.0fKiB subtitle:%1.0fKiB other streams:%1.0fKiB "
+           "global headers:%1.0fKiB muxing overhead: %s\n",
            video_size    / 1024.0,
            audio_size    / 1024.0,
            subtitle_size / 1024.0,

[-- Attachment #3: 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] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values
  2024-01-29  7:54 ` [FFmpeg-devel] [PATCH] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values 王昊然
@ 2024-01-31 23:23   ` Stefano Sabatini
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Sabatini @ 2024-01-31 23:23 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: whr

On date Monday 2024-01-29 15:54:27 +0800, 王昊然 wrote:
> Fix bug #10501
> 
> Signed-off-by: WHR <msl0000023508@gmail.com>
> ---
>  fftools/ffmpeg.c     | 4 ++--
>  fftools/ffmpeg_enc.c | 2 +-
>  fftools/ffmpeg_mux.c | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)

> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 53df200d1ab..035210a8e90 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -329,7 +329,7 @@ static void ffmpeg_cleanup(int ret)
>  
>      if (do_benchmark) {
>          int maxrss = getmaxrss() / 1024;
> -        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
> +        av_log(NULL, AV_LOG_INFO, "bench: maxrss=%iKiB\n", maxrss);
>      }
>  
>      for (i = 0; i < nb_filtergraphs; i++)
> @@ -570,7 +570,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
>      speed   = pts != AV_NOPTS_VALUE && t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1;
>  
>      if (total_size < 0) av_bprintf(&buf, "size=N/A time=");
> -    else                av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0);
> +    else                av_bprintf(&buf, "size=%8.0fKiB time=", total_size / 1024.0);
>      if (pts == AV_NOPTS_VALUE) {
>          av_bprintf(&buf, "N/A ");
>      } else {
> diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
> index 2a7fba0c51f..bc0d3a334d7 100644
> --- a/fftools/ffmpeg_enc.c
> +++ b/fftools/ffmpeg_enc.c
> @@ -612,7 +612,7 @@ static int update_video_stats(OutputStream *ost, const AVPacket *pkt, int write_
>  
>      bitrate     = (pkt->size * 8) / av_q2d(enc->time_base) / 1000.0;
>      avg_bitrate = (double)(e->data_size * 8) / ti1 / 1000.0;
> -    fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
> +    fprintf(vstats_file, "s_size= %8.0fKiB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ",
>             (double)e->data_size / 1024, ti1, bitrate, avg_bitrate);
>      fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(pict_type));
>  
> diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
> index ab86abee14f..ee708267c1e 100644
> --- a/fftools/ffmpeg_mux.c
> +++ b/fftools/ffmpeg_mux.c
> @@ -725,8 +725,8 @@ static void mux_final_stats(Muxer *mux)
>      }
>  
>      av_log(of, AV_LOG_INFO,
> -           "video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB "
> -           "global headers:%1.0fkB muxing overhead: %s\n",
> +           "video:%1.0fKiB audio:%1.0fKiB subtitle:%1.0fKiB other streams:%1.0fKiB "
> +           "global headers:%1.0fKiB muxing overhead: %s\n",
>             video_size    / 1024.0,
>             audio_size    / 1024.0,
>             subtitle_size / 1024.0,

LGTM, I'll apply in a few days if I see no comments, thanks.
_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2024-01-31 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAPge7yennCQdYPreeoO22rQ2QiKgtLbGDSCmddEJMgJJAOXw6g@mail.gmail.com>
2024-01-29  7:54 ` [FFmpeg-devel] [PATCH] fftools/ffmpeg: use correct unit prefix symbol for binary scaled byte values 王昊然
2024-01-31 23:23   ` Stefano Sabatini

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