libhevcenc: fix bitrate overshoot when lookahead is disabled

When rc lookahead is disabled, next frame encode context becomes NULL.
This context is used to signal end of gop. As this is NULL rc does not
know the end of gop causing over consumption of bits. Rely on intraframe
interval to resolve this.

Also, as there is no scene change detection, default all pics to single scene.

Bug: 140313463
Bug: 168628473
Bug: 166085628
Test: atest android.media.cts.VideoCodecTest
Merged-In: I6dcf9fb52d3aa18935e0b8d9ec9c193b15d30668
Change-Id: I6dcf9fb52d3aa18935e0b8d9ec9c193b15d30668
2 files changed