Skip to content

Commit

Permalink
Fix AV1 palette encoding error
Browse files Browse the repository at this point in the history
  • Loading branch information
HeJunyan authored and Bin-CI committed Oct 17, 2024
1 parent a06cd77 commit 086be04
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions patches/0001-vaav1enc-Do-not-enable-palette-mode-by-default.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From a03dc6e9f49e7c40f9de054fd7530c1e81df268e Mon Sep 17 00:00:00 2001
From: He Junyan <[email protected]>
Date: Tue, 15 Oct 2024 16:44:27 +0800
Subject: [PATCH] vaav1enc: Do not enable palette mode by default

Palette mode should only be enabled only when we know that the content
of the picture is simple. For example, only white letters on black
screen in SCC mode. So, by default, we need to disable it.
---
subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c
index 101a1aa766..d0ac0a4081 100644
--- a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c
+++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c
@@ -2333,8 +2333,8 @@ _av1_setup_encoding_features (GstVaAV1Enc * self)
/* not enable it now. */
self->features.enable_warped_motion = FALSE;
// (features.bits.support_warped_motion != 0);
- self->features.enable_palette_mode =
- (features.bits.support_palette_mode != 0);
+ self->features.enable_palette_mode = FALSE;
+ // (features.bits.support_palette_mode != 0);
self->features.enable_dual_filter =
(features.bits.support_dual_filter != 0);
self->features.enable_jnt_comp = (features.bits.support_jnt_comp != 0);
--
2.25.1

0 comments on commit 086be04

Please sign in to comment.