Mesa (master): radeon/vcn: add 0x02 to enc emulation prevention

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 4 02:42:12 UTC 2020


Module: Mesa
Branch: master
Commit: e37cd34ea6b2b58e584b32d0ebade67d8abd5c33
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e37cd34ea6b2b58e584b32d0ebade67d8abd5c33

Author: Ruijing Dong <ruijing.dong at amd.com>
Date:   Sun Sep 13 19:53:24 2020 -0400

radeon/vcn: add 0x02 to enc emulation prevention

Add 0x02 as a new case that triggers adding emulation prevention byte.

Signed-off-by: Ruijing Dong <ruijing.dong at amd.com>
Acked-by: Leo Liu <leo.liu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6942>

---

 src/gallium/drivers/radeon/radeon_vcn_enc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/radeon_vcn_enc.c b/src/gallium/drivers/radeon/radeon_vcn_enc.c
index ede9fb82146..84f766d2211 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_enc.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_enc.c
@@ -507,7 +507,8 @@ void radeon_enc_output_one_byte(struct radeon_encoder *enc, unsigned char byte)
 void radeon_enc_emulation_prevention(struct radeon_encoder *enc, unsigned char byte)
 {
    if (enc->emulation_prevention) {
-      if ((enc->num_zeros >= 2) && ((byte == 0x00) || (byte == 0x01) || (byte == 0x03))) {
+      if ((enc->num_zeros >= 2) && ((byte == 0x00) || (byte == 0x01) ||
+         (byte == 0x02) || (byte == 0x03))) {
          radeon_enc_output_one_byte(enc, 0x03);
          enc->bits_output += 8;
          enc->num_zeros = 0;



More information about the mesa-commit mailing list