From ca7b7084a9a4b1459d2ce85e3d633f1c5f021a5c Mon Sep 17 00:00:00 2001 From: Ram Mohan M Date: Fri, 21 Aug 2026 13:38:11 +0530 Subject: [PATCH] Picklpf: Fix chroma cost computation in search_filter_offsets As chroma has no separate q/side offsets for different edge directions, the rate has to be measured relative to zero. --- av2/encoder/picklpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/av2/encoder/picklpf.c b/av2/encoder/picklpf.c index 62e9eb8e76..7cccb45554 100644 --- a/av2/encoder/picklpf.c +++ b/av2/encoder/picklpf.c @@ -327,7 +327,6 @@ void av2_pick_filter_level(const YV12_BUFFER_CONFIG *sd, AV2_COMP *cpi, lf->delta_side_v = 0; int last_frame_offsets[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - int dir = 0; double best_single_cost = DBL_MAX; double best_dual_cost = DBL_MAX; int best_single_offsets[4] = { 0, 0, 0, 0 }; @@ -367,6 +366,7 @@ void av2_pick_filter_level(const YV12_BUFFER_CONFIG *sd, AV2_COMP *cpi, } if (num_planes > 1) { + const int dir = 2; double best_cost_u = DBL_MAX; double best_cost_v = DBL_MAX; // Cb