libs: encoder: h264: add multi reference support
authorHyunjun Ko <zzoon@igalia.com>
Wed, 2 Aug 2017 05:54:53 +0000 (14:54 +0900)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 2 Aug 2017 09:21:02 +0000 (11:21 +0200)
commitcdaf15b24d966093f2ca51fbfa1b1757cd3bcb0f
tree549ec45109fb8f723a24ba8e86398be604595562
parentcd6a9736bd289157bb1dbf4358f1439365ce289d
libs: encoder: h264: add multi reference support

Using num_ref_frames provided and the result of the Query
VAConfigAttribEncMaxRefFrames, it determines the size of reference list
and perform encoding with multi reference frames as the following:

1\ The num_ref_frames is being considered as the number of
reference picture list0
2\ Encoder adds 1 reference frame more to the reference picture list1
internally if b-frame encoding.
3\ If num_ref_frames is bigger than the number of refrence frames
supported in the driver, it will be lowered.

https://bugzilla.gnome.org/show_bug.cgi?id=783803
gst-libs/gst/vaapi/gstvaapiencoder_h264.c