encoder: hevc encoder expects allocation returns zeroed memory

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)
Merged-In: I76fa9371aac6ef5fca3923435e0010cf2f13db6f
Change-Id: I76fa9371aac6ef5fca3923435e0010cf2f13db6f
2 files changed
tree: ab2d4e47817d9677b3babe73b4fab55d913a8064
  1. .github/
  2. cmake/
  3. common/
  4. decoder/
  5. encoder/
  6. fuzzer/
  7. test/
  8. Android.bp
  9. CMakeLists.txt
  10. FrameInfo.md
  11. libhevc_blocklist.txt
  12. LICENSE
  13. METADATA
  14. MODULE_LICENSE_APACHE2
  15. NOTICE
  16. OWNERS
  17. PREUPLOAD.cfg
  18. README.md
README.md

LIBHEVC

Getting Started Document

LibHEVC build steps

Supports:

  • aarch32/aarch64 on Linux.
  • aarch32/aarch64 on Android.
  • x86_32/x86_64 on Linux.

Native Builds

Use the following commands for building on the target machine

$ cd external/libhevc
$ mkdir build
$ cd build
$ cmake ..
$ make

Cross-compiler based builds

Building for x86_32 on a x86_64 Linux machine

$ cd external/libhevc
$ mkdir build
$ cd build
$ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake ..
$ make

Building for aarch32/aarch64

Update ‘CMAKE_C_COMPILER’, ‘CMAKE_CXX_COMPILER’, ‘CMAKE_C_COMPILER_AR’, and ‘CMAKE_CXX_COMPILER_AR’ in CMAKE_TOOLCHAIN_FILE passed below

$ cd external/libhevc
$ mkdir build
$ cd build

For aarch64

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake
$ make

For aarch32

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
$ make