1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc/vvc: Remove floating point logic

This was the only floating point logic in the native VVC decoder.

Signed-off-by: Frank Plowman <post@frankplowman.com>
This commit is contained in:
Frank Plowman 2024-11-10 20:24:33 +00:00 committed by Nuo Mi
parent 994368be8f
commit 1e5f24d1a6

View File

@ -184,13 +184,13 @@ int ff_vvc_intra_pred_angle_derive(const int pred_mode)
return intra_pred_angle;
}
#define ROUND(f) (int)(f < 0 ? -(-f + 0.5) : (f + 0.5))
int ff_vvc_intra_inv_angle_derive(const int intra_pred_angle)
{
float inv_angle;
av_assert0(intra_pred_angle);
inv_angle = 32 * 512.0 / intra_pred_angle;
return ROUND(inv_angle);
av_assert2(intra_pred_angle != 0);
if (intra_pred_angle > 0)
return ROUNDED_DIV(32*512, intra_pred_angle);
else
return -ROUNDED_DIV(32*512, -intra_pred_angle);
}
//8.4.5.2.7 Wide angle intra prediction mode mapping proces