perf: improve vectorization optimizations and add function multi-versioning (#1271)

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
K4YT3X
2024-12-22 05:53:09 -05:00
committed by GitHub
parent f68939c478
commit e1e8ed864d
11 changed files with 116 additions and 52 deletions

View File

@@ -135,6 +135,7 @@ AVPixelFormat get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat
return best_pix_fmt;
}
[[gnu::target_clones("default", "avx2", "avx512f")]]
float get_frame_diff(AVFrame *frame1, AVFrame *frame2) {
if (!frame1 || !frame2) {
logger()->error("Invalid frame(s) provided for comparison");