[rdoq] partly fix rdoq for 16x1 and 1x16

This commit is contained in:
Joose Sainio 2022-12-15 11:25:12 +02:00 committed by Marko Viitanen
parent 8e4b864e6b
commit 926ed7e145
2 changed files with 2 additions and 2 deletions

View file

@ -1461,7 +1461,7 @@ void uvg_rdoq(
const uint32_t cg_size = 16; const uint32_t cg_size = 16;
const int32_t shift = 4 >> 1; const int32_t shift = 4 >> 1;
const uint32_t num_blk_side = width >> shift; const uint32_t num_blk_side = MAX(width >> shift, 1);
double cost_coeffgroup_sig[ 64 ]; double cost_coeffgroup_sig[ 64 ];
uint32_t sig_coeffgroup_flag[ 64 ]; uint32_t sig_coeffgroup_flag[ 64 ];

View file

@ -2615,7 +2615,7 @@ const uint32_t* const uvg_get_scan_order_table(int scan_group, int scan_type, in
return g_scan_order[scan_group][log2_w][log2_h]; return g_scan_order[scan_group][log2_w][log2_h];
} }
else { else {
if (log2_w == 1 || log2_h == 1) { if (log2_w <= 1 || log2_h <= 1) {
// Just return array containing [0, 15] in order // Just return array containing [0, 15] in order
return g_scan_order[scan_group][0][4]; return g_scan_order[scan_group][0][4];
} }