Commit graph

8 commits

Author SHA1 Message Date
Ram Mohan M
50fd862b8d libavcenc: Remove duplicate code and improve readability
This commit does not introduce any new functionality w.r.t previous
commit. But it fixes few things. They are listed below:
1. Guard Bands in header files are fixed
2. Header files contains function definition comments. These are same
as in source file. Maintaining same comment at two locations is
unnecessary. These are removed.
3. Improved consistency and code indentation
4. Removed comments that dont align with implementation
5. Grouped headers of a workspace together
2023-10-01 01:37:17 +05:30
Aayush Soni
bbf593f216 libavcenc: fix null buffer dereferencing
During encoding, if encoder encounters an error, the library returns the
same. If the application ignores it and feeds further input, library
while processing the new input is facing a null dereference.

1. Added a error check in encode API call before processing input
2. Made entropy bitstream buffer overflow errors non-fatal.

Bug: 187499509
Test: POC in bug descriptions
      atest VtsHalMediaC2V1_0TargetVideoEncTest
      atest -c CtsMediaV2TestCases:CodecEncoderTest
2023-06-01 22:39:26 -07:00
Chamarthi Kishore
4bc3e63c30 encoder: Return gracefully from entropy encoding errors
Recent error propagation change in encoder introduced a DoS when
output buffer is not large enough to hold the frame encoded.
This commit fixes the DoS seen.

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Test: revert fix for b/144928581 to reduce the output buffer size
Test: atest android.media.cts.VideoEncoderTest#testGoogH264FlexMaxMax
Test: atest android.media.cts.VideoEncoderTest#testGoogH264Flex1080p

Bug:145019703

Change-Id: I3b3408153a2cb8541a87547d51dd8bde25a33d6c
2019-12-03 15:30:38 +05:30
Chamarthi Kishore
95a2113e4b libavc: Handling of Error propagation
This commit has changes to Error return propagation to
the caller functions.

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 142545567

Change-Id: I015ebe03e753a0edc1bf8bfc167180ead63193e1
2019-10-24 17:54:31 +05:30
Chamarthi Kishore
ad2eaf8c7d libavc: Add MDCV, CLL, CCV and AVE SEI messages
This commit add support for encoding and decoding of MDCV, CLL, CCV and
AVE SEI messages

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 141931623

Change-Id: Idc0b0db5291482ae2bc19cdff65669c32374b02a
2019-10-24 17:20:00 +05:30
Hamsalekha S
4202606c70 Encoder added support for VUI params
SPS will now include vui params
Removed a trailing space in ih264e_api.c

Change-Id: I67a57741689206e571e9a83f7e3360149f87e06a
2015-08-04 11:27:29 +05:30
Lajos Molnar
cd9e51fc2b fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:34:51 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30