vavp9enc: Do not use base class video info to calculate coded size

We should use our in_info which is an adjusted value to calculate
that coded size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6826>
This commit is contained in:
He Junyan 2024-05-11 13:29:36 +08:00 committed by GStreamer Marge Bot
parent 869b6f2968
commit 07dceabdfc

View file

@ -1752,8 +1752,8 @@ _vp9_calculate_coded_size (GstVaVp9Enc * self)
codedbuf_size = codedbuf_size / 2;
} else if (self->rc.max_bitrate_bits > 0) {
guint64 frame_sz = gst_util_uint64_scale (self->rc.max_bitrate_bits / 8,
GST_VIDEO_INFO_FPS_D (&base->input_state->info),
GST_VIDEO_INFO_FPS_N (&base->input_state->info));
GST_VIDEO_INFO_FPS_D (&base->in_info),
GST_VIDEO_INFO_FPS_N (&base->in_info));
/* FIXME: If average frame size is smaller than 1/10 coded buffer size,
we shrink the coded buffer size to 1/2 to improve performance. */