Commit graph

41 commits

Author SHA1 Message Date
Sushant
5e9c764903 avcenc: Replacing KEEP_THREADS_ACTIVE with runtime check
Test: avcenc -c enc.cfg
Change-Id: If6c8c29d2b5b1322796b8b25dc74231d13b61243
2025-04-22 17:09:57 +05:30
Sushant
ee0c417a64 avcenc: add support for KEEP_THREADS_ACTIVE
Currently avc encoder creates desired number of threads at
the start of every frame and joins after frame is processed.
This change modifies the thread creation part. Now the threads
are created at the start of the sequence. Kept alive through
out the sequence and joined at the end of the sequence. This
helps in reduction of thread creation and deletion overhead.

This change does not effect the encoded bitstream. That is,
encoded output with this change is same as encoded output
without this change.

Bug: 288998933
Test: avcenc -c enc.cfg
Change-Id: I98784169052a5f05c109aaf1de97a5e46d7a773d
2025-03-20 07:11:55 -07:00
Srujan Vandrangi
f6a923b765 libavc: remove unused KEEP_THREADS_ACTIVE flag in Android.bp
Bug: 376303949
Test: Build and review
Change-Id: If2eddf34e5c59b0d8b7e35b80b9b28a47f4d72a1
2024-11-04 09:19:56 -08:00
Harish Mahendrakar
1c9bd7e20a Remove useless neon: clause.
There hasn't been a non-neon platform build in years.

Bug: 330929681
Test: Builds
Change-Id: I712c2111722a17ecf55ab36e8069275c74379256
2024-03-23 15:08:24 -07:00
Harish Mahendrakar
47dfd4ca64 Rename test as examples
Also rename test/decoder as test/avcdec and test/encoder as test/avcenc

Change-Id: Ia21513d91206d806a2aa2177012765c54287bc77
2023-09-28 10:22:54 +05:30
Ram Mohan M
bbcac434f2 libavc: tidy up android bp - 2
sort listings in alphabetical order

Test: Build
2023-09-20 06:19:47 -07:00
Ram Mohan
240680473f libavc: tidy up android bp
sort listings in alphabetical order

Test: Build
2023-09-20 14:38:12 +05:30
Harish Mahendrakar
a3766576c3 Format Android.bp files
Minor changes in names of defaults in order get consistency between
libraries and applications being built.

Test: builds
2023-03-08 22:14:36 -08:00
Harish Mahendrakar
7164209291 Updates to Android.bp and some formatting fixes
- Only libavcdec is marked as available to apex modules instead
  of marking all decoder libraries to be available to apex modules.
- some formatting changes for consistency with neighboring lines.

Test: Builds
2023-03-08 20:27:18 -08:00
chamarthi.kishore
375b9b7e44 SVC decoder support 2023-02-08 07:55:47 -08:00
Ashwin Natesan
bb0f31cb6b Encoder: SVC encoding support added
Added support for encoding 'Scalable Baseline' profile, corresponding to
profile_idc of 83 in 'Rec. ITU-T H.264 (11/2007)'.

Bug: 248891908
Test: svcenc -c enc.cfg
Change-Id: Ib12ca4c4a8c0e674738ae2af01558a08cefe0929
2023-01-30 11:07:10 -08:00
Mao Han
e8b0093646 Add riscv64 support
Use generic function pointers on riscv.

Test: built for aosp_riscv64
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I424d15396d7e9711d23a6118f92aee0fc7924c28
2022-12-01 22:27:12 +00:00
Manisha Jajoo
e559967790 Encoder: add support for PSNR export
This CL adds support to report PSNR between incoming and resulting
encoded frames. Eventually be reported upstream as part of a feedback
mechanism.

Test: avcenc -c enc.cfg
Bug: b/235899898

Change-Id: Id520913ca5964965b5a86bc520240ccd1b28176c
2022-08-17 17:22:00 +00:00
Ashwin Natesan
779bbfdb00 Decoder: MVC decoding support added
Added support for decoding 'Multiview High' profile, corresponding to
profile_idc of 118 in 'Rec. ITU-T H.264 (08/2021)'.

Bug: 232169767
Test: atest CtsMediaV2TestCases

Change-Id: I63256344a8a205e74f2bcebe555f5ba6cc3163d0
2022-08-06 05:51:31 +00:00
Ray Essick
12813f245c Export header files
So that consumers don't need to use raw paths via include_dirs
Sort export_include_dirs: [] lists

Bug: 201944383
Test: build

Merged-In: Id6789b54da4d8ec1be6c7a60d8ba2e757d5d8801
Change-Id: Id6789b54da4d8ec1be6c7a60d8ba2e757d5d8801
(cherry picked from commit 7faf1311eb)
2022-07-05 13:34:21 -07:00
Manisha Jajoo
d1e64cc366 Decoder: add support for KEEP_THREADS_ACTIVE
Current design of AVC Decoder creates new threads
to process each frame. This CL adds support to reuse
the threads across frames.

Test: avcdec -c dec.cfg
Bug: 191124963

Change-Id: I087699c4c7ce6aa59a1d8b078ae196a50dcf889c
2022-02-09 17:59:29 +05:30
Bob Badour
c0aae295ed [LSC] Add LOCAL_LICENSE_KINDS to external/libavc
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  fuzzer/Android.bp
  test/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I3ad48ae634869eb3486d5c68962c992be83b2003
2021-02-14 10:37:21 -08:00
Cindy Zhou
bb48f97189 Libavc remove diag
Removing diag mode since it's only required for debugging purposes.
Bug: 158010610
Test: n/a

Change-Id: I8f87913ab14bcd97ec8e6975893726e3ee92e399
2021-01-13 11:39:38 -08:00
Cindy Zhou
91b4a017ed Enable cfi for libavc
Bug: 158010610
Bug: 173497308
Test: Ran atest with DecoderConformanceTest, ImageReaderDecoderTest,
VideoDecoderPerfTest, VideoEncoderTest. Compare the
before and after enabling CFI results since there was a number of tests
that were initially failing.

Change-Id: Ib6b0871809e89bf26c426c5616dea6238f2a02ce
2020-12-17 05:43:36 -08:00
Pirama Arumuga Nainar
6d44b362b9 Use blocklist sub-property in sanitize
Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: build topic
Change-Id: Id7e09811092c8f026e1006d2a1d8355c444081a6
2020-07-28 14:29:02 -07:00
Jiyong Park
89a120262a mark libavc and libavcenc available to the platform
The library is installed to the platform via the dependency chain:

android.hardware.media.omx@1.0-service
-> libstagefright_soft_avcdec
-> libavc

and

-> libstagefright_soft_avcenc
-> libavcenc

Bug: 153073816
Test: m
Change-Id: Ib206ae858601b0dca6dccb09e8c53028feef0362
2020-04-24 21:44:52 +09:00
Jooyung Han
669c6bb63c Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: I6cfff21dcaf861392f8b69d97195831cdda4c1be
2020-04-24 10:02:10 +09:00
Elliott Hughes
748aa1e459 Remove mips workarounds.
Test: treehugger
Change-Id: I3396db9548fe941759a6e8f546b81a10b1a7de01
2020-03-06 21:23:46 -08:00
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
Harish Mahendrakar
e2b463d2f8 encoder: Add host support
Test: Build libavc on host
Bug: 139379050

Change-Id: Ifcf60e2e0efd8a31df2a9741007ce6f544cdce3f
2019-09-20 22:05:26 +00:00
Harish Mahendrakar
8718ff04c4 Merge "decoder: Add host support"
am: dcdaa5c232

Change-Id: I7c2271201499ce8b758f9cb4af470123e9ab862e
2019-08-21 17:56:18 -07:00
Harish Mahendrakar
41bd9cb168 decoder: Add host support
Test: Build libavcdec on host
Bug: 139379050
Change-Id: If81b01e3058e1ae42c8d266571a07deb39fbd603
2019-08-16 12:50:09 -07:00
Ivan Lozano
096aa21441 Remove libavc sanitizer diagnostics.
Remove libavc sanitizer diagnostics.

Bug: 111547941
Test: mma -j
Change-Id: I0d9bce58f23e71a9751c81eea74f48b33307b169
2019-02-12 11:07:58 -08:00
Ivan Lozano
c8bcfb3f66 Enforce ubsan sanitizers in libavc.
Keep sanitizers in diagnostics mode but don't recover from them so we
get errors in tombstones.

Bug: 110791537
Test: mma -j

Change-Id: Ib5e7d110ded68e19e276d79f99f648fea3f70078
2018-12-17 10:28:34 -08:00
Yi Kong
4b62b29321 Suppress null-pointer-arithmetic warning am: 9908df5214 am: a515293da1
am: 072f38f8fd

Change-Id: I8296af0f1f3e19314d6c58fe62d5076dd33abd18
2018-12-13 12:57:42 -08:00
Yi Kong
9908df5214 Suppress null-pointer-arithmetic warning
Test: m checkbuild
Bug: 72331524
Change-Id: I592abac6402809d126ad83fe6a79551bf068e90c
2018-12-12 02:45:09 -08:00
Ivan Lozano
def7f774cb Enable bounds sanitization in libavc.
Enables bounds sanitization in libavc, initially with diagnostics.

Bug: 117221610
Test: Device boots
Change-Id: Iee99f655c5ea0611d5dc32a121c7f1cf60763c7c
2018-10-04 15:23:20 -07:00
Ivan Lozano
36352e2ad4 Don't explicitly enable CFI in libavc.
Previously there was no other sanitization, so in order for the
blacklist to be picked up CFI had to be enabled. With integer_overflow
enabled, we no longer need it enabled explicitly in the build file.
Since libavc is a static library, both CFI and non-CFI variants will
be built and linked accordingly.

If libavc is used as a shared library in the future, we'll need to
explicitly re-enable CFI in the build file.

Bug: 63926619
Test: Library builds.
Change-Id: I2646e1422c29073d2e622ded1a9074426b186130
2018-07-17 08:42:51 -07:00
Ivan Lozano
ce46181b5f Enable integer overflow sanitization for libavc.
This enables integer overflow sanitization for libavc, initially in
diagnostics mode.

Bug: 110791537
Test: CTS tests
Change-Id: Ida5679156d866ed24f468867244bb00a10d967ca
2018-07-13 13:40:29 -07:00
Wonsik Kim
83355ea81f Blacklist cfi for libavc
CFI does not recognize assembly functions as valid indirect call
targets.

Test: no cfi checks in libavcdec/libavcenc
Change-Id: I173eeaad0a908bfd055d21a5c7eec9634ba0ac95
2018-01-22 11:33:09 -08:00
Chih-Hung Hsieh
e86daca6c9 Use -Werror in external/libavc am: 4852fbb62a am: a93c0e8b18
am: b683d3d275

Change-Id: If3f77b2e11fe935248be1fcf776548a3d4dce63f
2017-10-15 04:24:14 +00:00
Chih-Hung Hsieh
4852fbb62a Use -Werror in external/libavc
* Suppress unused-variable warnings.
* Keep constant-conversion warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Id46435816c0d671c9e03c5297810596df596c7f2
2017-09-28 13:39:11 -07:00
Isaac Chen
23788e9685 Enable 32-bit armv8 NEON for libavc am: 78002919ca am: d1b54afe17
am: 3029bfa72e

Change-Id: I85df297a4a0e325c8bf65159edd99d8498dad575
2017-09-15 04:39:19 +00:00
Isaac Chen
78002919ca Enable 32-bit armv8 NEON for libavc
Since ARM neon instructions were only used on armv7-a-neon
architecture variant, the default implementation for this
library doesn't use these advanced SIMD instructions.

Bug: 65568114
Test: lunch aosp_arm64; emulator # on oc-mr1-dev; boot to home screen
Change-Id: I7d0c75045fc69523861ed5a00f6033ac327f4031
2017-09-12 16:57:35 +08:00
Jiyong Park
4bd04b1b0c Make software codecs as VNDK
Software codecs and their dependencies are marked as VNDK (or just
vendor_available:true for static/header libs).

Bug: 37343418
Test: build the software codecs with BOARD_VNDK_VERSION=current
Change-Id: I84a07188fda0e89e422caee634cb12ec82568028
2017-08-07 13:14:45 +09:00
Colin Cross
fc442e1b02 Convert external/libavc to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I302d98be9e99fce7284a44af329e22f38a2f066a
2017-05-02 13:55:44 -07:00