libavcenc: relocate the update post enc routines

During bitstream overflow errors, it is possible that update post
enc gets skipped as last row might never have to be entropy coded
as we have already consumed the buffer. This can be fatal for
encoding further frames. Move this update to a location where it
is guaranteed to be updated

Bug: oss-fuzz-62378
Test: ./avc_enc_fuzzer

Change-Id: I279deb1f30c15c057c0b6e909834313a1df4fdac
2 files changed
tree: 82c6b3950512279185a62a9cfd0be2f2f820add8
  1. .github/
  2. cmake/
  3. common/
  4. decoder/
  5. encoder/
  6. fuzzer/
  7. test/
  8. .clang-format
  9. Android.bp
  10. CMakeLists.txt
  11. FrameInfo.md
  12. libavc_blocklist.txt
  13. LICENSE
  14. METADATA
  15. MODULE_LICENSE_APACHE2
  16. NOTICE
  17. OWNERS
  18. PREUPLOAD.cfg
  19. README.md
README.md

LIBAVC

Getting Started Document

LibAVC 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/libavc
$ mkdir build
$ cd build
$ cmake ..
$ make

Cross-compiler based builds

Building for x86_32 on a x86_64 Linux machine

$ cd external/libavc
$ 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/libavc
$ 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