Commit graph

65 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
Suyog Pawar
266cda3c3b libavc : Enable support for MacOS
Test: ./avcenc
      ./avcdec

Change-Id: If03196cf979d7f6638b99d5b13afba6df3364178
2024-10-04 06:51:30 -07:00
Ashwin Natesan
51268b3a71 svcenc: Redundant code removed
The following lines of code have been removed to improve coverage -
  [x] Functions -
      - isvc_interleaved_copy
      - isvc_16bit_interleaved_copy
      - isvc_16bit_interleaved_memset
      - isvc_iquant_itrans_recon_chroma_4x4_neon
      - isvc_iquant_itrans_recon_chroma_4x4_sse42
      - isvc_iquant_itrans_recon_4x4_dc_with_res_output_neon
      - isvc_iquant_itrans_recon_res_dc_4x4_sse42
      - isvc_iquant_itrans_recon_4x4_dc_with_res_accumulate_neon
      - isvc_iquant_itrans_recon_res_dc_with_res_acc_4x4_sse42
      - isvce_wait_for_thread
  [x] Function pointer initialisations for the functions above

Test: svc_enc_fuzzer
2023-10-27 06:14:32 -07:00
Ashwin Natesan
ea694873e0 svcenc: Enabled and verified 420sp inputs
Test: svc_enc_fuzzer
2023-10-10 07:07:21 -07:00
Ram Mohan M
0ab5c42d27 libavc: 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. Maintain Indentation consistency across the code.
4. Remove unused code
2023-10-06 16:53:23 -07:00
Ram Mohan M
583887f906 libavc: correct return value of buf mgr avbl check util
The function returns status as success even in failed scenarios.
This is corrected.
2023-10-04 13:51:14 -07:00
Srujan Vandrangi
72e8241a64 decoder: replace KEEP_THREADS_ACTIVE macro with avc decoder struct variable
Bug: 289097296
Test: Build
2023-07-22 09:51:37 -07:00
Harish Mahendrakar
a7c8d47643 Fix formatting in FGC commit 2023-02-21 12:36:55 -08:00
Shireesh Kadaramandalgi
b6b12cc5f0 libavc: Add support for FGC SEI message
- Decoder: Added support for FGC SEI parsing and exporting
2023-02-21 12:36:55 -08:00
Mallikarjun Kamble
8e41a50de4 libavc: Added support for SII SEI message
- Add SII flag and SII parameters for the encoder and decoder.
- Encoder: Added support for SII SEI
- Decoder: Added support for SII SEI parsing and exporting
2023-02-14 22:00:13 -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
Harish Mahendrakar
6334fd9a1c Remove mips specific files
Test: Builds
Bug: 261484694

Change-Id: Ied9694ee9f7245e2db37ff42b7fb98cb58397af9
2022-12-06 02:52:33 +05:30
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
Harish Mahendrakar
eb463e5aa2 cmake: Set C standard to C90 and move few macros to specific targets
- Set CMAKE_C_STANDARD to 90
  Because of this, moved some declarations to start of the block
- Move PROFILE_ENABLE and MD5_DISABLE to specific targets as these
  macros are not used when building libraries

Bug: 242076773
Test: Builds
Change-Id: Icd0b8a48f015a695185ce2220800348f7a7512f1
2022-08-30 20:00:54 +00:00
Treehugger Robot
d249d3642d Merge "Decoder: MVC decoding support added" 2022-08-08 14:53:05 +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
aeb7fa461e Merge "Decoder: add support for QP and block_type map export in library" 2022-07-18 23:35:32 +00:00
Ray Essick
5fcca088bd Recast FWD_QUANT to avoid -1 / unsigned confusion
Bug: 173082061
Test: compilation
Change-Id: I28f0f87ad39719d40747b83119f4c019054812db
2022-06-22 21:21:25 -07:00
Shivaansh Agrawal
0033e0fe5e Decoder: add support for QP and block_type map export in library
Bug: 175179303

Test: avcdec -c dec.cfg
Test: atest CtsMediaV2TestCases:CodecDecoderTest
Test: atest VtsHalMediaC2V1_0TargetVideoDecTest

Change-Id: I68f3a85aae1f4bca2c3e1eaad69d8eb7f23481b8
2022-05-17 09:55:20 +05:30
Neelkamal Semwal
f5513f5722 [automerge] encoder: Fix out of bound access of prediction buffer 2p: 27fbb43bd6
Original change: 17354043

Bug: 204704614
Change-Id: I8e4f1f4c57fae1510835733173c505326f39e28f
Merged-In: I72b5cb8b63351efb60b65ecbb5e7a8c8bc1fcd94
2022-03-23 17:36:10 +00:00
Neelkamal Semwal
27fbb43bd6 encoder: Fix out of bound access of prediction buffer
While calculating the residual for inter 4x4 MB, the intrinsic
instruction reads extra 4-bytes from the prediction buffer

Test: POC in the bug description

Bug: 204704614

Change-Id: I72b5cb8b63351efb60b65ecbb5e7a8c8bc1fcd94
(cherry picked from commit c79d0f5092)
Merged-In: I72b5cb8b63351efb60b65ecbb5e7a8c8bc1fcd94
2022-03-23 17:35:47 +00:00
Treehugger Robot
a3721a6a8c Merge "Decoder: add support for KEEP_THREADS_ACTIVE" 2022-02-23 18:52:13 +00: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
Ashwin Natesan
ca68f61641 Builds: Modular cmake scripts added
Cmake scripts are now modular. Separate scripts now handle
build specifications for each target and dependency.

Toolchain files have been added for armv7, armv8 builds.

Bug: 213579857
Test: Builds using cmake
Test: Builds in OSS-fuzz

Change-Id: Iac62b443c0a0de09a2ce6553a660db2c3d5dc846
2022-02-02 11:14:55 +05:30
Chamarthi Kishore
68dce05ea6 Merge changes I015ebe03,Idc0b0db5 am: 00fa4b6490 am: 7684b467b4
am: d49fffd5f4

Change-Id: I0da6b5b695adb949b28ca9d29f806cd11625d2eb
2019-10-31 19:11:43 -07: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
7befa935af Added error check while parsing scaling_list
Test: poc in bug
Bug: 134405507
Change-Id: Ic3289a4fb1652dd35be5e2b59dbc41f2c888786f
2019-07-22 13:55:21 -07:00
S Hamsalekha
65477dcfb9 Decoder: Replacing some numbers with equivalent macros.
Bug: 118445723
Test: vendor
Change-Id: I2dbdf3bf289c34409db341d7c0502cd88a20bab5
2019-03-28 14:40:47 -07:00
Isha Kulkarni
34769a5b08 Decoder: Fix Integer Sanitizer Issues
Bug: 118445723
Test: vendor
Change-Id: I719898beb93ca5d20d9822f685ac6d4920252cdf
2019-03-28 14:40:40 -07:00
Isha Shrikant Kulkarni
fc7139a53e Decoder: Fix Integer Sanitizer issues in ih264d_process_bslice
Bug: 118445723
Test: vendor
Change-Id: Ib5d8f72be016330beafa6e7996976eeff1b23c39
2019-03-28 14:40:17 -07:00
TreeHugger Robot
04c6e3baba Merge "Decoder: Fix undefined left shift" 2018-04-10 22:44:09 +00:00
Ritu Baldwa
9083317185 Decoder: Fix CLZ return value
Since left shift by 32 is undefined value, making it 31.

Bug: 73337905
Bug: 73337480
Bug: 73337472
Test: manual
Change-Id: Id03991e75ea32d29bafa2d0bbb2bda7d5876fb03
2018-04-10 13:57:22 -07:00
Ritu Baldwa
4be8f62fca Decoder: Fix undefined left shift
Bug: 73337131
Bug: 71446680
Bug: 73337973
Test: review
Change-Id: Idbbbf9db5f75cedb4a821296ee79c8a47b768a2f
2018-04-09 09:12:03 -07:00
Martin Storsjo
f1c718c267 armv8: Remove unnecessary register shuffling
Change-Id: I48f79644a7c31dd82c1c531fb534b9e1c8a0d729
2016-10-06 10:29:44 +03:00
Martin Storsjo
e5b0a782fa armv8: Use neg instead of sub #0, neg as replacement for rsb
When the arm code has been ported to aarch64, occurrances of
the rsb instruction have been replaced according to the
following pattern:

arm:
    rsb rB, rA, #X

aarch64:
    sub xTMP, xA, #X
    neg xB, xTMP

When the immediate constant #X is zero, we can just as well
use a plain neg instruction without any extra subtraction.

Change-Id: I637be20b469d8d4e7fac712e8039c7e3eedb8c54
2016-10-06 10:29:44 +03:00
Martin Storsjo
37edf81bad arm: Use neg instead of rsb with a #0 immediate
Change-Id: I52cc96b15a553e3c757d2a627c1e2201fc832f24
2016-10-06 10:29:44 +03:00
Martin Storsjo
6958350a65 armv8: Remove unnecessary sign extensions
After loading a single byte with ldrb and immediately moving
it into a vector register with dup .8b, there's no point in
sign extending it to 64 bit inbetween.

Similarly in the second case, when adding a number of pixels,
there's no need to sign extend between additions, just do the
additions using the 32 bit register names.

Change-Id: Ie37f47b93138643ffd05169a3792bc39967dbea3
2016-10-06 10:29:44 +03:00
Martin Storsjo
d91f49ad65 armv8: Add missing sign extension for WORD32 parameters
For WORD32 parameters, the upper half of the parameter
registers is undefined (even though it is zero in most cases).

When easily doable, use the 'w' register names for such
parameters instead of doing the sign extension with a
separate instruction.

This fixes crashes in some configurations, when built with
clang, which can pass nonzero bits in the high half of registers
more aggressively than GCC.

Also fix the parameter/register mappings; use wN register
names where applicable, and fix incorrect parameter
placement. (Some functions still were documented to have
only 4 parameters in registers.)

Change-Id: Icedf6503b064149d1a651ff1c6a76de5c01722ea
2016-10-06 10:29:43 +03:00
Martin Storsjo
391a0d9418 arm, armv8: Fix C function signature data types
Some parameters had incorrect types. Some were consistently
wrong in both arm and armv8 versions, while others only were
wrong in the armv8 version.

Change-Id: I3efd5c66b32516484fbaa42067d3b12d73fbf09e
2016-10-05 14:24:54 +03:00
Martin Storsjo
545b474453 armv8: Remove duplicated, incorrect function argument declarations
Having incorrect comments is only misleading and confusing.

Change-Id: I7560e152194c8d50d6218b0b2144a9628218b7c3
2016-10-05 14:24:53 +03:00
Martin Storsjo
11a0471851 armv8: Remove an unused register assignment
Nothing actually uses this register here.

Change-Id: I15ae625d17e126b515f9458b921b97fa6dcb6a85
2016-10-05 14:24:53 +03:00
Martin Storsjo
1b025fff7c arm, armv8: Fix some comments to refer to the right register
Change-Id: I4483a6090d684b95f738e737d6a78cae45ee4655
2016-10-05 14:23:53 +03:00
Martin Storsjo
91d2783e2b Mark arrays of pointers as const
Previously they were only marked as the pointers pointing to const
data, but the array themselves being non-const.

Change-Id: Ib5a9af6298615b2c40367a21e728899418b09935
2015-06-27 00:43:36 +03:00
Marco Nelissen
ac694327a0 Merge "Remove all other thread implementations than pthread" 2015-06-25 14:29:09 +00:00
Martin Storsjo
cc89b12115 Remove all other thread implementations than pthread
Change-Id: Id30fc1a9c007f2f32ed3375bbf02085f0edad5a0
2015-06-25 13:31:23 +03:00
Martin Storsjo
cc87241e79 Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
2015-06-25 13:29:52 +03:00
Martin Storsjo
ab3f812396 arm: Use vqmovun instead of vqshrun #0
binutils gas automatically produces vqmovun when vqshrun is used
with a zero shift.

This is required for building the armv8 assembly with the clang built-in
assembler.

Change-Id: Ie986978e4508a085e4e4c76f8db9a8a8394c4fec
2015-06-24 20:45:42 +00:00
Martin Storsjo
d847c7fd84 arm: Use unified syntax, ldrsheq instead of ldreqsh
clang only supports the new, unified arm syntax (UAL), while binutils
gas supports both (and defaults to the old syntax). Explicitly declare
that the unified syntax is used, and use the right form of these
instructions that is supported by both.

Change-Id: I9a3940e060c129861c7a542ccf09035dbd1766ae
2015-06-24 20:45:21 +00:00