Commit graph

58 commits

Author SHA1 Message Date
Ethan Cheng
cbd0e91d89 Redefine hevc examples test modules as cc_binary
Some checks are pending
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
This change redefines the `cc_test` modules within the test
directory as `cc_binary` modules.

Previously, these `cc_test` modules were effectively acting as wrappers
around executable binaries, solely for the purpose of generating test
executables. This approach did not allow for the direct installation of
these executables on devices.

Changing these modules to `cc_binary` allows the resulting executables
are produced as standalone binaries, enabling their deployment and
execution on test devices.

Bug: 33315805
Test: 1. m hevcdec
      2. m hevcenc
      3. verifying both binaries exists and can be called
Flag: EXEMPT TEST_ONLY
Change-Id: I70945c15895e2e18eb3fa0d5c109a3d0fdaf7f05
2026-04-01 15:33:37 -07:00
Elliott Hughes
b9c1bf8bbf libhevc: ignore BTI for now.
The assembler in this project needs updating, but we want to enable the
bti-report=error flag globally.

Change-Id: Id7d8e3c52c74f007c73729bac35b76c23cd02956
2026-04-01 15:33:37 -07:00
Ram Mohan M
646f97bcd2 hevcdec: fix typo in filename in android bp
Test: Build

Change-Id: I587e7546278f1e4b54546f0394c9ad2c680f3ee2
2026-03-06 14:33:04 -08:00
Ram Mohan M
ad0a6d8688 hevcdec: add itrans residue functions
These functions are similar to ihevc_itrans_recon_* with the exception
that instead of computing recon directly they store residue to the
destination buffer. This helps with additional transformation of the
residue coefficients (rotation, rdpcm, ccp) before adding to the
prediction data to generate the final recon.

Test: Build
Change-Id: I9f84e66f5e9595162335cb152a6329a0f8d23337
2026-03-04 12:32:03 -08:00
Ram Mohan M
546576fa3d hevcdec: fix incorrect error checks added in sps/pps parsing
Some checks failed
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
range extension profile toolsets were guarded based on chroma format
information instead of profile. This is fixed.

Test: ./hevcdec -c test.cfg

Change-Id: I484b07f367d46a60112d3ef7c4a431bf72047e6e
2026-02-20 11:12:39 -08:00
Vivek Jadhav
8cbcc58d4a libhevcdec: Remove support for YUV422 ile, RGB565 and RGBA8888 output formats
Some checks are pending
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
These color formats are no longer supported. The decoder now returns
an error if configured for any of these output formats

Test: ./hevcdec

Change-Id: I944c539000f26898d5985cd6806f2968d4365f63
2026-02-14 12:54:18 -08:00
Rakesh Kumar
464af74ef0 hevcdec: add 32x32 chroma inverse trans recon functions
Test: ./hevcdec
Change-Id: I6d02a519738727257392d7d13b187c998e8e82d5
2026-02-13 07:43:12 -08:00
Srujan Vandrangi
05bce9147a libhevc: remove unused KEEP_THREADS_ACTIVE flag in Android.bp
Bug: 376303949
Test: Build and review
Change-Id: I7c8009b0f986b8b95a6cb1dc7e0f45b216d261d8
2024-11-04 10:31:20 -08:00
srujan vandrangi
5fa218d639 libhevc: fix codec SEI related code while disabling SEI
Bug: 338446610
Test: ./hevcenc
Test: ./hevcdec
2024-06-06 22:27:43 -07:00
Srujan Vandrangi
b2b115e957 libhevc: move encoder SEI related code under a macro
Bug: 338446610
Test: ./hevcenc

Change-Id: I76fa9371aac6ef5fca3723425e0010cf1f13db1f
2024-05-09 07:40:11 -07:00
Srujan Vandrangi
dc225332d0 libhevc: move SEI related code under a macro
Bug: 338446610
Test: ./hevcdec
2024-05-07 10:07:49 -07:00
Harish Mahendrakar
bf58c9a885 Remove useless neon: clause.
There hasn't been a non-neon platform build in years.

Bug: 330929681
Test: Builds
Change-Id: I48fcc213c5faf93ce06a3345d00316cda0925ea5
2024-03-24 16:18:10 -07:00
Ram Mohan
a0898d5415 libhevc: tidy up android bp
sort listings in alphabetical order

Test: Build
Change-Id: Iddc937c72cebed88aad3d14f222f61dac904938b
2023-09-20 06:05:43 -07:00
Harish Mahendrakar
3f937636db encoder: Fix warnings due to -WSwitch
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
2023-09-17 21:05:31 -07:00
Harish Mahendrakar
e4b160c9e5 decoder: cleanup MULTICORE macro 2023-05-26 16:13:41 +05:30
Colin Cross
96b43f1aee Add riscv64 to libhevc
Add riscv64 to libhevc using the C functions.

Test: lunch aosp_riscv64-userdebug && mmma external/libhevc
Change-Id: I19c9b230e746e41d0d33ba185f1e0b940d80c9a7
2023-01-26 05:00:55 +00:00
Ray Essick
ab017803a1 Export header files
so that consumer's can use header_libs and static_libs instead
of absolute paths in include_dirs. Sort export_include_dirs: [] entries.

Bug: 201944383
Test: build
Change-Id: Ib2cae8e1f2991166193822ba1c5f5a518fb172a3
2022-01-25 19:29:01 -08:00
Bob Badour
f15d7159a2 [LSC] Add LOCAL_LICENSE_KINDS to external/libhevc
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  fuzzer/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Iee5e51d0c121359a6bc308643d8365ef3329eefa
2021-02-12 15:26:01 -08:00
Cindy Zhou
456708b60a Enable cfi for libhevc
Keeping in original blocklist.
Bug: 158010610
Bug: 173497308
Test: ran atest DecoderConformanceTest, ImageReaderDecoderTest,
VideoDecoderPerfTest, VideoEncoderTest, CodecDecoderSurfaceTest and VideoEncoderDecoderTest.
Compare the before and after enabling CFI results since there was a number of tests
that were initially failing.

Change-Id: I51f99cefacbeeedb6ccfcb9d826c6016d7e7edd6
2021-01-20 22:10:45 +00:00
Cindy Zhou
c90f5fab32 Revert "Enable cfi for libhevc"
Revert submission 1515852-enable_cfi_hevc

Reason for revert: cts breakages
Reverted Changes:
I4d5ff6818:Enable cfi for libhevc
I181015a7d:Enable cfi in hevc library

Change-Id: Ieb8415ef29456a0df7be287a1edf07c7fb351a87
2021-01-11 19:02:24 +00:00
Cindy Zhou
379fb7b446 Enable cfi for libhevc
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: I4d5ff6818b50755b233b0e3530f46b3680da9bb7
2020-12-21 05:13:58 -08:00
Ray Essick
57d4fdc39b Merge "Decoder: add support for KEEP_THREADS_ACTIVE" 2020-10-09 22:23:38 +00:00
Manisha Jajoo
c57a80373a Decoder: add support for KEEP_THREADS_ACTIVE
Current design of HEVC Decoder creates new threads
to process each frame. This CL adds support to reuse
the threads across frames.

Test: manual
Bug: 167126301

Change-Id: Ic57133b25203dae9ed5d3d974e6137a733531da7
2020-08-31 22:00:10 +05:30
Xin Li
2b30b18f20 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I5ece55d96833e810f1cc9e6c5ea32dd09ce7971b
Change-Id: I5ef2e77d39e78af6e5932cb2e7bb3de5eb7c1b9c
2020-08-27 18:40:58 -07:00
Pirama Arumuga Nainar
10fa7ae5b2 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: Ibf4d9446cfc72e4dc98bae3712536b31a02d2ad9
Merged-In: Ibf4d9446cfc72e4dc98bae3712536b31a02d2ad9
2020-07-29 20:41:00 +00:00
Jooyung Han
ac35214d88 Set min_sdk_version to be part of mainline modules am: ee37a5334d am: 675dd385b1
Change-Id: Ic18c9448a55297b0033af11c85e9517a6b18043b
2020-04-27 07:03:50 +00:00
Jooyung Han
ee37a5334d 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: I951905d4181af2334a0918215a64a6008e317fff
2020-04-23 00:51:14 +09:00
Treehugger Robot
2b6a9ec8da Merge "Make it clear that the cc_tests aren't actually tests." am: 3b8a89df32 am: 974076ad57
Change-Id: I28ba4a688be5bf64474882998e3b41824a40d38e
2020-03-23 19:26:27 +00:00
Elliott Hughes
1c6b54b0c8 Make it clear that the cc_tests aren't actually tests.
They should perhaps be cc_binary instead, though cc_test makes it clear
we don't want to actually ship them on the device. So just mark them as
not being gtests.

Test: treehugger
Change-Id: Iad72813748b937a5f6f96673954ed0381c3f37d5
2020-03-19 13:35:54 -07:00
Automerger Merge Worker
27424e67f7 Remove mips workarounds. am: 579f4d362b am: 4b32a0f045
Change-Id: I68ca34f0111151479b1fd37c1c9dcff7ce4eaa3f
2020-03-10 00:29:24 +00:00
Elliott Hughes
579f4d362b Remove mips workarounds.
Test: treehugger
Change-Id: Ibb8ca20ce42f8fa0435a7f1d7bb5e825d5d11156
2020-03-06 21:38:10 -08:00
Harish Mahendrakar
98c438b49f encoder: Add host support am: 0a59baaeee am: 002ade3fc5 am: a99811b8bf
am: 5c0c468281

Change-Id: Ib5838c9000400a081122f404c1823e1024ad8b1e
2019-09-20 22:39:22 -07:00
Harish Mahendrakar
0a59baaeee encoder: Add host support
Test: Build libhevc on host
Bug: 139379050
Change-Id: Ie4698f91364a0ba2beea842cd9cc75ade41cd7e5
2019-09-20 22:02:37 +00:00
Harish Mahendrakar
6b9c0cee6c Disable macOS build am: 96bcc2c3e0 am: 77855b0180 am: b0b1ca386b
am: 4ba993d44d

Change-Id: Id0896b4aa7605e85429ff883907475d5e0cf965b
2019-09-09 16:03:05 -07:00
Harish Mahendrakar
96bcc2c3e0 Disable macOS build
There is no memalign on Darwin.
So disable the build for macOS till memalign is replaced with
an alternative.

Test: Review
Bug: 140696633

Change-Id: Icf36be19a8b6bd22cf2827e95d262020df5bdba0
2019-09-09 10:27:53 -07:00
Ray Essick
a664e72b3f Merge "Add host support to build hevcdec binary" am: b534035e26 am: fa260baf7b am: 10123bcccd am: c11127f251
am: c1229b17d1

Change-Id: I4dc84908b633f8c008a1d60b262513a6ccde37ad
2019-08-20 17:52:18 -07:00
Ray Essick
fa260baf7b Merge "Add host support to build hevcdec binary"
am: b534035e26

Change-Id: I67826b7d05e05b973ff88146187e17faa5d1b2fa
2019-08-20 16:16:04 -07:00
Harish Mahendrakar
9ae7f2575a Add host support to build hevcdec binary
Test: Build libhevc on host
Bug: 139379050
Change-Id: Ia125abda94a449c91a4611a141c0019b621b8da6
2019-08-16 01:20:16 +00:00
Mitch Phillips
efe67e57e7 Add host support to libhevcdec. am: 84e41b12e7 am: 6d554d1db2 am: 02eefdc356
am: b5de726c60

Change-Id: I1aff5dfcee2eac6111c61a4a0f98c617c56891d8
2019-06-20 21:54:00 -07:00
Mitch Phillips
02eefdc356 Add host support to libhevcdec. am: 84e41b12e7
am: 6d554d1db2

Change-Id: Id14b246eb462b4fda82b49c0710b824d4c9734e6
2019-06-20 20:59:46 -07:00
Mitch Phillips
84e41b12e7 Add host support to libhevcdec.
Adds host support to libhevcdec, which will allow us to fuzz this target
on host in the future.

Test: Build libhevc on host.
Bug: 133261679
Change-Id: I006b00f659c382bc996981d27bba67f086267af7
2019-06-17 14:49:49 -07:00
Harish Mahendrakar
f03afe46b5 encoder: Remove sanitization diagnostics
These were removed for libhevc decoder earlier.

Test: Build and flash
Bug: 133065144

Change-Id: I5a1541a0ee6780a9a877fc02fc805ca0764fac79
2019-05-28 15:25:41 -07:00
Ram Mohan
c0745f1209 libhevcenc: reduce min resolution from 320x240 to 2x2
Test: hevcenc -c vid_enc_cfg.txt
Bug: 129763447

Change-Id: If4dbaba1086694fd2030b05c232988d8c1807fea
2019-05-03 21:36:21 +00:00
Ram Mohan
69da5e22f6 libhevcenc: Initial commit
Test: hevcenc -c vid_enc_cfg.txt

Bug: 110456253
Test: CtsMediaTests/VideoEncoder
Change-Id: I9df8143709c3fe5d2c8398974a16529a3f8b8ebc
2019-02-18 07:43:11 -08:00
Ivan Lozano
e2edd95a40 Remove libhevc sanitization diagnostics.
Remove libhevc sanitization diagnostics.

Bug: 111555901
Test: mma -j
Change-Id: I4c5c00fd1548bc0fd6bb7c98032262c51345295d
2019-02-12 11:09:04 -08:00
Ivan Lozano
6599524021 Enforce ubsan sanitizers in libhevc.
Keep sanitizers in diagnostics mode but don't recover from them so we
get errors in tombstones.

Bug: 110791537
Test: mma -j
Change-Id: Id36356d8ed4cfc4913a2c9dc32f7ac7389fcaa6f
2018-12-18 10:17:49 -08:00
Ivan Lozano
b61b523c13 Enable bounds sanitization in libhevc.
Enables bounds sanitization in libhevc, initially with diagnostics.

Bug: 117221610
Test: Device boots
Change-Id: I84d8978b42eddb67462286bf004947b6db1acf90
2018-10-04 11:00:20 -07:00
Ivan Lozano
20a0df1a80 Don't explicitly enable CFI in libhevc.
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 libhevc is a static library, both CFI and non-CFI variants will
be built and linked accordingly.

If libhevc 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: If852aa732d12f1176f57c3c9f7f4574d709c13ab
2018-07-17 09:49:44 -07:00
Ivan Lozano
11b93edeae Enable integer overflow sanitization in libhevc.
Enable integer overflow sanitization in libhevc, initially in
diagnostics mode.

Bug: 110791537
Test: CTS tests
Change-Id: Ib2979f76599a56f540e54d3377aeb0ddd71c2446
2018-07-17 09:45:49 -07:00
Ivan Lozano
37f2b87318 Build hevcdec with Soong instead of Make.
am: 662b247f65

Change-Id: I2aee7a803da2214f8c8cdcf3e589d0e8bf0c471c
2018-07-17 09:11:35 -07:00