Mesa (10.6): radeon/vce: fix vui time_scale zero error

Emil Velikov evelikov at kemper.freedesktop.org
Thu Oct 1 09:28:56 UTC 2015


Module: Mesa
Branch: 10.6
Commit: 0dae12ac6e188307747c9698299b0ce649f9f505
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0dae12ac6e188307747c9698299b0ce649f9f505

Author: Leo Liu <leo.liu at amd.com>
Date:   Fri Sep 18 15:51:26 2015 -0400

radeon/vce: fix vui time_scale zero error

if app pass 0 as frame_rate_num, it should not be encoded to the VUI.

Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 1e97b41893a4f53a71ee141a5e8a046fed7b49cd)

---

 src/gallium/drivers/radeon/radeon_vce_40_2_2.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
index 0902957..ac8d672 100644
--- a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
+++ b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
@@ -251,6 +251,9 @@ static void vui(struct rvce_encoder *enc)
 {
 	int i;
 
+	if (!enc->pic.rate_ctrl.frame_rate_num)
+		return;
+
 	RVCE_BEGIN(0x04000009); // vui
 	RVCE_CS(0x00000000); //aspectRatioInfoPresentFlag
 	RVCE_CS(0x00000000); //aspectRatioInfo.aspectRatioIdc




More information about the mesa-commit mailing list