UPSTREAM: radeon/vce: Bitrate not updated when changing framerate

Issue: Encoding parameters not updated after changing FrameRate

Root Cause:
In rvce_begin_frame, need_rate_control was enabled if the target_bitrate,
quant_i_frames, quant_p_frames, quant_b_frames or rate_ctrl_method
changes. Due to this the rate_control() was not updating the encoder
parameters with new framerate, peak_bits_per_picture_integer and
avg_target_bits_per_picture

Fix:
Added the condition where we will check if there is a change in
other parameters and enable need_rate_control. Eventually updating the
encoder parameters with new framerate and bitrate.

BUG=b:170792224

TEST=tast run video.EncodeAccelNew.h264_720p

Signed-off-by: Krunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7696>
(cherry picked from commit 35613c752f5826dcc5bbfbfb8e6ab0ab3127b7d3)
Change-Id: If66df77624063feed969082d1deb83390cccfbfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mesa/+/2550979
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
(cherry picked from commit 64f8a86e5ea2f03905fbaa298be336ca2fd0820c)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mesa/+/2566530
Commit-Queue: Drew Davenport <ddavenport@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
1 file changed