aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vulkan_encode_av1.c
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2025-08-08 22:37:50 +0900
committerJames Almer <jamrial@gmail.com>2025-08-08 15:07:33 +0000
commitd132b63dd9833427c97d74de91366e0b5c6cc64e (patch)
tree99396f3c87392203ac582aa1928cd58a2c862015 /libavcodec/vulkan_encode_av1.c
parent6f97c9384b67ef24972069ff7c66c44dcd615f19 (diff)
downloadffmpeg-d132b63dd9833427c97d74de91366e0b5c6cc64e.tar.gz
vulkan_encode_av1: properly give an FPS value for ff_av1_guess_level
Diffstat (limited to 'libavcodec/vulkan_encode_av1.c')
-rw-r--r--libavcodec/vulkan_encode_av1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/vulkan_encode_av1.c b/libavcodec/vulkan_encode_av1.c
index 51f4d284c1..855b993bf5 100644
--- a/libavcodec/vulkan_encode_av1.c
+++ b/libavcodec/vulkan_encode_av1.c
@@ -598,12 +598,11 @@ static int init_profile(AVCodecContext *avctx,
/* Set level */
if (avctx->level == AV_LEVEL_UNKNOWN) {
const AV1LevelDescriptor *level;
- float framerate;
+ float framerate = 0.0;
if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
- framerate = avctx->framerate.num / avctx->framerate.den;
- else
- framerate = 0;
+ framerate = av_q2d(avctx->framerate);
+
level = ff_av1_guess_level(avctx->bit_rate, enc->seq_tier,
base_ctx->surface_width, base_ctx->surface_height,
enc->tile_rows * enc->tile_cols,