GNOME Bugzilla – Bug 719697
encoder: h264: allow user-defined number of reference frames
Last modified: 2018-11-03 15:43:55 UTC
We need to provide a way to specify how many reference frames are allowed. This covers both L0 and L1 lists, if B-frames are used.
- "ref": number of reference frames to use (default: 1)
Our h264 encoder only supports one reference at most due to driver's limitation. do we really need to specify the reference number? it will not improve the compression rate substantially.
(In reply to comment #1)
> Our h264 encoder only supports one reference at most due to driver's
> limitation. do we really need to specify the reference number? it will not
> improve the compression rate substantially.
When do you think the limitation is to be lifted? I thought we supported up to 4 nowadays.
The idea here was not about improving the compression ratio, but rather improve the perceived visual quality. In x264, it looks like raising the number of reference frames from 1 to 3 makes it possible to gain ~0.25 dB in PSNR.
Meanwhile, I am OK to drop this from 0.5.8 requirements then. Thanks.
Now in encoding driver, the VME shaders support 2 refs for B dual direction predict, and support only 1 for P frame, although the packing command support 4 reference information, but VME only provide 2 refs info at most.
we have ever discussed about expanding the reference frame count, but VME shaders need to be rewrited, it will take many efforts to achive, so we'd better defer this bug fixing.
Postponed to a later stage when the driver supports more than 1-2 refs.
As per comment #3, the HW can really support up to 16 refs, even back to Sandybridge (with restrictions). This is what multipass is for. Though, up to 4 would be enough to me.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/3.