From patchwork Sun Dec 15 06:40:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 16800 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 383FE448568 for ; Sun, 15 Dec 2019 09:43:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AD3C688371; Sun, 15 Dec 2019 09:43:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 154176881B7 for ; Sun, 15 Dec 2019 09:43:48 +0200 (EET) Received: by mail-pf1-f196.google.com with SMTP id l127so2082735pfl.1 for ; Sat, 14 Dec 2019 23:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xIthaVSgoyyOaYtbu9Ngud0eIZGVsLUc7VGeHTYWcFU=; b=MDw7xt0fMQcTybGpqA7TMlnty0oRvS8IY5Ur7TmhdT30NBcMv7uzvDsP9vQuw0n3Xa UVbzjj9/4yPpJMRWYrfBYK//sHUbY2QBKMTOe1aMeHCxEXT+q5m4XOdeK7yhLri8ppao tj9PEA1/eHvlagjsoiQ1w7J2Ug+9JHYkJt6i8AyRc80X1XCV0g9Gn2Oz2750pZwlxs3N FJ1U3PBJ9vlC4nxvsEZn8Z6hAgmuJF6nJEzC0D7DuyxDuJJULGyzpdwUv05Hx27N7guj QKKc3E9SiwN2QRvihWy/5cZAFeggn4NegOBds6c4bzaCW2ypEDqB3dn/tpsjCd2xfdqh PYRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xIthaVSgoyyOaYtbu9Ngud0eIZGVsLUc7VGeHTYWcFU=; b=YFagIszEq1e4MJMU3Mnm4QngcbYfh64ljUUjvXXy3tqINPJGSs67PfmjixMs53em71 tW1bNFy0hdduM924Wh2ZuMRLRAr5Yo6PcHXa9Ew93NVc3APN4v/IbPeACDB7JQyDl0Pa zHzrE5IqaTFxaK9XYDAnTdMAlejZMQ/TLYRLcPfbFW0FxetjJ8rvvfrxKX8toTGclyXk 7KvQ/cEtMDa33tX2HrhDPpISjU3AedkED0DMwUcGxrl6+hje9gixdE4B8UtgKXDMZ5o8 VhqmJgxQQUV24LJ/lBNwvlePA/hWI4f7CF+VrR2NliPbonG0fik3UuHIugg9UByUJU+2 sD/Q== X-Gm-Message-State: APjAAAVJ7i1ib1orszayaWFQJLLkmIFVlnh82yk86YsiiiXTCnHAkhZG 5GQC+ePamY4Nfr00Om+gjfvXUlit X-Google-Smtp-Source: APXvYqyNoxCGw5IMA36FPyujbpaOtwf5qOXyg43fsuv6xzp/ChN1khggU6mHGFlHmVxZOxyVCWVh4w== X-Received: by 2002:a63:130a:: with SMTP id i10mr9584383pgl.199.1576392057021; Sat, 14 Dec 2019 22:40:57 -0800 (PST) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id j10sm14250645pjb.14.2019.12.14.22.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Dec 2019 22:40:56 -0800 (PST) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Dec 2019 14:40:52 +0800 Message-Id: <1576392052-30861-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [FFmpeg-devel] [PATCH] lavc/cbs_av1: Add read/write flag in log message X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao 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 --- 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", +#ifdef READ + "Read", +#else + "Write", +#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,