mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +00:00
[isp] Add height to idct getter function. Check block dimensions in transform 2d functions.
This commit is contained in:
parent
c982ed837a
commit
45e76eae63
|
@ -1634,7 +1634,7 @@ static void mts_idct_avx2(
|
|||
|
||||
if (type_hor == DCT2 && type_ver == DCT2 && width == height)
|
||||
{
|
||||
dct_func* idct_func = uvg_get_idct_func(width, color, tu->type);
|
||||
dct_func* idct_func = uvg_get_idct_func(width, height, color, tu->type);
|
||||
idct_func(bitdepth, input, output);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2560,7 +2560,7 @@ static void mts_idct_generic(
|
|||
|
||||
if (type_hor == DCT2 && type_ver == DCT2 && !tu->lfnst_idx && !tu->cr_lfnst_idx && width == height)
|
||||
{
|
||||
dct_func *idct_func = uvg_get_idct_func(width, color, tu->type);
|
||||
dct_func *idct_func = uvg_get_idct_func(width, height, color, tu->type);
|
||||
idct_func(bitdepth, input, output);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -99,7 +99,7 @@ dct_func * uvg_get_dct_func(int8_t width, int8_t height, color_t color, cu_type_
|
|||
if (width != height) {
|
||||
// Non-square block. Return generic dct for non-square blokcs.
|
||||
assert(false && "This should never be called at this point. Non-square stuff is done inside mts_dct function.");
|
||||
return uvg_dct_non_square;
|
||||
//return uvg_dct_non_square;
|
||||
}
|
||||
switch (width) {
|
||||
case 4:
|
||||
|
@ -128,8 +128,13 @@ dct_func * uvg_get_dct_func(int8_t width, int8_t height, color_t color, cu_type_
|
|||
*
|
||||
* \returns Pointer to the function.
|
||||
*/
|
||||
dct_func * uvg_get_idct_func(int8_t width, color_t color, cu_type_t type)
|
||||
dct_func * uvg_get_idct_func(int8_t width, int8_t height, color_t color, cu_type_t type)
|
||||
{
|
||||
if (width != height) {
|
||||
// Non-square block. Return generic dct for non-square blokcs.
|
||||
assert(false && "This should never be called at this point. Non-square stuff is done inside mts_idct function.");
|
||||
//return uvg_idct_non_square;
|
||||
}
|
||||
switch (width) {
|
||||
case 4:
|
||||
//if (color == COLOR_Y && type == CU_INTRA) {
|
||||
|
|
|
@ -86,7 +86,7 @@ extern mts_idct_func* uvg_mts_idct;
|
|||
|
||||
int uvg_strategy_register_dct(void* opaque, uint8_t bitdepth);
|
||||
dct_func * uvg_get_dct_func(int8_t width, int8_t height, color_t color, cu_type_t type);
|
||||
dct_func * uvg_get_idct_func(int8_t width, color_t color, cu_type_t type);
|
||||
dct_func * uvg_get_idct_func(int8_t width, int8_t height, color_t color, cu_type_t type);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -271,14 +271,13 @@ void uvg_itransform2d(const encoder_control_t * const encoder,
|
|||
color_t color,
|
||||
const cu_info_t *tu)
|
||||
{
|
||||
if (encoder->cfg.mts)
|
||||
if (encoder->cfg.mts || block_width != block_height)
|
||||
{
|
||||
uvg_mts_idct(encoder->bitdepth, color, tu, block_width, block_height, coeff, block, encoder->cfg.mts);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ISP_TODO: block height
|
||||
dct_func *idct_func = uvg_get_idct_func(block_width, color, tu->type);
|
||||
dct_func *idct_func = uvg_get_idct_func(block_width, block_height, color, tu->type);
|
||||
idct_func(encoder->bitdepth, coeff, block);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue