
iNumRefFrame specifies total number of reference buffers to allocate. For N temporal layers we need at least (N - 1) buffers to store last encoded frames of all reference temporal layers. There is no API in OpenH254 encoder to specify exact set of references to be used to prediction of a given frame. Encoder can theoretically use all available references. Note that there is logic in OpenH264 which overrides iNumRefFrame to max(iNumRefFrame, N - 1): https://source.chromium.org/chromium/chromium/src/+/main:third_party/openh264/src/codec/encoder/core/src/au_set.cpp;drc=8e90a2775c5b9448324fe8fef11d177cb65f36cc;l=122. I.e., this change has no real effect. It only makes setup more clear. Bug: none Change-Id: If4b4970007e1cc55d8f052ea05213ab2e89a878f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225480 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34445}