This update improves the encoder's behavior and ensures it runs efficiently
when the iframeinterval is less than or equal to maxbframes. In this
case, the encoder ignores the maxbframes.
Test: ./hevcenc
earlier, hevc encoder memory allocation wrappers were not clearing the memory.it requires explicit calling of memset functions wherever required for memory management.
this has been resolved since the memory reset happens with in the function call and returns the zeroed memory whenever it is called and does memory management efficiently.
Bug: 275059745
Bug: 275060007
Bug: 275802472
Bug: oss-fuzz:57397, oss-fuzz:57398, oss-fuzz:57401
Test: hevc_enc_fuzzer
(cherry picked from https://partner-android-review.googlesource.com/q/commit:545fd7bfd22d2894057caac2baa835a082f515fd)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a0b217f1c0b58547e6732e77cff6306e9b8c7e81)
Merged-In: I76fa9371aac6ef5fca3923435e0010cf2f13db6f
Change-Id: I76fa9371aac6ef5fca3923435e0010cf2f13db6f
There were a few switch case blocks that didn't cover all possible
cases.
- ME_USER_DEFINED wasn't used anywhere, so removed it.
- In all the other cases fixed, uncovered cases are not reachable,
so added a default with a log for those cases.
These above changes require some default initializations.
Bug: 244507923
Test: Builds
Also in encoder define PROFILE_ENABLE only when not defined
This is need to fix multiple definitions error when building
libhevc using cmake.
Bug: 241484499
Test: Build with cmake
Change-Id: I122b3db8f57604df3a8655ad1b75562fd71cd909
ihevce_rc_conv_pic_type() had an initialization which
was missing a typecast.
Bug: 241128234
Test: Builds
Change-Id: Ie30cd6fcc98a2b6233afc0aaf81bff7a210e7101
Add modular Cmake scripts. Separate scripts now handle
build specifications for each target and dependency.
Toolchain files have been added for armv7, armv8 builds.
Bug: 210759503
Test: Builds using cmake
Test: Builds in OSS-fuzz
Change-Id: I5f522d3904907b33a39df52fc06f047be1f21834
libhevc encoder library would return error if the configured frame_qp
was not within the range. This patch removes that check on the initial
frame qp as it is clipped to valid range later.
Test: hevcenc -c enc.cfg
Bug: 182015210
Change-Id: I708dd69f2ba7a26eb4b4ee1d3b3585bc16c00d3a
When processing V plane, an extra byte was being read in some
of the neon modules.
Modules are now updated to avoid that extra byte read.
Bug: 177433559
Bug: 183012467
Test: poc in bug
Test: atest CtsMediaTestCases:VideoEncoderTest
Test: atest CtsMediaV2TestCases:CodecEncoderTest
Test: atest VtsHalMediaC2V1_0TargetVideoEncTest
Change-Id: I598c50f727b4d62f19523cbb008482e27de5e3cc
memcmp was used in a loop to compare data that
was being updated by other threads.
memcmp doesn't support comparing volatile data.
This is now replaced by a function which
compares the volatile data to zero
Bug: 168427831
Bug: 177354159
Bug: 177483127
Test: atest VtsHalMediaC2V1_0TargetVideoEncTest
Test: atest CtsMediaV2TestCases
Change-Id: I00c5a9ac3e5ae792337017dbbb89d3947687e1e9
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
Change-Id: I6dcf9fb52d3aa18935e0b8d9ec9c193b15d30668
Async command control buffer is not being released after use.
This is corrected.
Also ensured dynamic bitrate doesn't go below min supported bitrate
Test: hevcenc -c vid_enc_cfg.txt
Bug: 147574800
Change-Id: I0e31092bb9c51ce5d22798aab6004d1654ff985e
chroma intra pred 3_to_9 mode av8 assembly loads 16 bytes ahead of base
address of intermediate buffer but doesnt use it. Allocate this
additional size and offset the same to avoid access violation
Test: hevcenc -c vid_enc_cfg.txt --input selfie_1280_720.yuv --src_width 512 --src_height 512
Bug: 144595488
Change-Id: I1094cf4593ba379354f567876288e2d9b9fae83d