[FFmpeg-devel] [PATCH] lavc/cbs_av1: Add read/write flag in log message
James Almer
jamrial at gmail.com
Sun Dec 15 15:50:34 EET 2019
On 12/15/2019 3:40 AM, Jun Zhao wrote:
> From: Jun Zhao <barryjzhao at tencent.com>
>
> Before this change, the command:
>
> ffmpeg -y -i bear-av1.mp4 -c:v copy bear-av1.ivf -loglevel 99
>
> always dump the log message like:
>
> AVBSFContext @ 0x55ff99e78e00] Frame 4: size 320x240 upscaled 320 render 320x240 subsample 2x2 bitdepth 8 tiles 1x1.
> Last message repeated 1 times
>
> it's hard to distinguish writing or reading.
>
> Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> ---
> libavcodec/cbs_av1_syntax_template.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
> index 523f935..9947441 100644
> --- a/libavcodec/cbs_av1_syntax_template.c
> +++ b/libavcodec/cbs_av1_syntax_template.c
> @@ -1552,9 +1552,15 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
> }
> }
>
> - av_log(ctx->log_ctx, AV_LOG_DEBUG, "Frame %d: size %dx%d "
> + av_log(ctx->log_ctx, AV_LOG_DEBUG, "%s Frame %d: size %dx%d "
> "upscaled %d render %dx%d subsample %dx%d "
> - "bitdepth %d tiles %dx%d.\n", current->order_hint,
> + "bitdepth %d tiles %dx%d.\n",
The line break should be at the end of the string.
> +#ifdef READ
> + "Read",
> +#else
> + "Write",
Nit: Written.
> +#endif
> + current->order_hint,
> priv->frame_width, priv->frame_height, priv->upscaled_width,
> priv->render_width, priv->render_height,
> seq->color_config.subsampling_x + 1,
>
More information about the ffmpeg-devel
mailing list