Commit 9343964e authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/vaapiVEA: Do not log framerate and bitrate if they don't vary

RequestEncodingParametersChange() can configure the same
bitrate and framerate as the last configured values.
Since VaapiVieoEncodeAccelerator logs them every
RequestEncodingParametersChange(), it floods chrome logging.

As we are not interested in the unchanged values, this CL makes
VaapiVEA log the framerate and bitrate only if they vary.

Bug: None
Test: appr.tc/?vsc=h264&debug=loopback
Change-Id: Ie0354bc92b919c2bfcb4d2131de29e8e2736a4ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082741Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746248}
parent a52ab64c
......@@ -250,6 +250,8 @@ bool H264Encoder::UpdateRates(const VideoBitrateAllocation& bitrate_allocation,
curr_params_.framerate == framerate) {
return true;
}
VLOGF(2) << "New bitrate: " << bitrate_allocation.GetSumBps()
<< ", New framerate: " << framerate;
curr_params_.bitrate_bps = bitrate;
curr_params_.framerate = framerate;
......
......@@ -838,7 +838,6 @@ void VaapiVideoEncodeAccelerator::UseOutputBitstreamBufferTask(
void VaapiVideoEncodeAccelerator::RequestEncodingParametersChange(
uint32_t bitrate,
uint32_t framerate) {
VLOGF(2) << "bitrate: " << bitrate << " framerate: " << framerate;
DCHECK_CALLED_ON_VALID_SEQUENCE(child_sequence_checker_);
VideoBitrateAllocation allocation;
......@@ -853,8 +852,6 @@ void VaapiVideoEncodeAccelerator::RequestEncodingParametersChange(
void VaapiVideoEncodeAccelerator::RequestEncodingParametersChange(
const VideoBitrateAllocation& bitrate_allocation,
uint32_t framerate) {
VLOGF(2) << "bitrate: " << bitrate_allocation.GetSumBps()
<< " framerate: " << framerate;
DCHECK_CALLED_ON_VALID_SEQUENCE(child_sequence_checker_);
encoder_task_runner_->PostTask(
......@@ -867,8 +864,6 @@ void VaapiVideoEncodeAccelerator::RequestEncodingParametersChange(
void VaapiVideoEncodeAccelerator::RequestEncodingParametersChangeTask(
VideoBitrateAllocation bitrate_allocation,
uint32_t framerate) {
VLOGF(2) << "bitrate: " << bitrate_allocation.GetSumBps()
<< " framerate: " << framerate;
DCHECK_CALLED_ON_VALID_SEQUENCE(encoder_sequence_checker_);
DCHECK_NE(state_, kUninitialized);
......
......@@ -143,6 +143,8 @@ bool VP8Encoder::UpdateRates(const VideoBitrateAllocation& bitrate_allocation,
current_params_.framerate == framerate) {
return true;
}
VLOGF(2) << "New bitrate: " << bitrate_allocation.GetSumBps()
<< ", New framerate: " << framerate;
current_params_.bitrate_allocation = bitrate_allocation;
current_params_.framerate = framerate;
......
......@@ -5,8 +5,7 @@
#include "media/gpu/vaapi/vp9_encoder.h"
#include "base/bits.h"
#define DVLOGF(level) DVLOG(level) << __func__ << "(): "
#include "media/gpu/macros.h"
namespace media {
......@@ -147,6 +146,8 @@ bool VP9Encoder::UpdateRates(const VideoBitrateAllocation& bitrate_allocation,
current_params_.framerate == framerate) {
return true;
}
VLOGF(2) << "New bitrate: " << bitrate_allocation.GetSumBps()
<< ", New framerate: " << framerate;
current_params_.bitrate_allocation = bitrate_allocation;
current_params_.framerate = framerate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment