mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[isp] Fix some asserts to allow log2_dim 1 block sizes. Fix coefficient group scan order for small dimensions.
This commit is contained in:
parent
d39fddf0d8
commit
99495c331b
|
@ -1248,7 +1248,8 @@ void uvg_intra_build_reference_inner(
|
|||
const int cu_x = cu_loc->x;
|
||||
const int cu_y = cu_loc->y;
|
||||
|
||||
assert((log2_width >= 2 && log2_width <= 5) && (log2_height >= 2 && log2_height <= 5));
|
||||
// Log2_dim 1 is possible with ISP blocks
|
||||
assert((log2_width >= 1 && log2_width <= 5) && (log2_height >= 1 && log2_height <= 5));
|
||||
|
||||
refs->filtered_initialized = false;
|
||||
uvg_pixel * __restrict out_left_ref = &refs->ref.left[0];
|
||||
|
|
|
@ -66,7 +66,8 @@ static void uvg_angular_pred_generic(
|
|||
const int log2_width = uvg_g_convert_to_log2[width];
|
||||
const int log2_height = uvg_g_convert_to_log2[height];
|
||||
|
||||
assert((log2_width >= 2 && log2_width <= 5) && (log2_height >= 2 && log2_height <= 5));
|
||||
// Log2_dim 1 is possible with ISP blocks
|
||||
assert((log2_width >= 1 && log2_width <= 5) && (log2_height >= 1 && log2_height <= 5));
|
||||
assert(intra_mode >= 2 && intra_mode <= 66);
|
||||
|
||||
static const int16_t modedisp2sampledisp[32] = { 0, 1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 23, 26, 29, 32, 35, 39, 45, 51, 57, 64, 73, 86, 102, 128, 171, 256, 341, 512, 1024 };
|
||||
|
|
|
@ -2615,6 +2615,12 @@ 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];
|
||||
}
|
||||
else {
|
||||
return g_scan_order[scan_group][log2_w - 2][log2_h - 2];
|
||||
if (log2_w == 1 || log2_h == 1) {
|
||||
// Just return array containing [0, 15] in order
|
||||
return g_scan_order[scan_group][0][4];
|
||||
}
|
||||
else {
|
||||
return g_scan_order[scan_group][log2_w - 2][log2_h - 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue