summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc/enc/src
Commit message (Collapse)AuthorAgeFilesLines
* Stagefright: Remove unused variables and filesAndreas Gampe2016-03-221-13/+0
| | | | | | | | | | For build-system CFLAGS clean-up. Bug: 18632512 (cherry picked from commit 765b4172f1ffb2c4e2de89163bb888fa352de664) Change-Id: I765dc394f39f60801843851760fdf9838958d7a4
* Fix build with clang in C++11 modeBernhard Rosenkränzer2014-11-271-1/+1
| | | | | | | | | This removes the deprecated register keyword in many places, fixes one instance of passing '\0' where a char* is expected, and 2 switch type narrowing issues. Change-Id: Ie265ac26ff6a61267ad6406dfe237226d97ca9ac Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
* Stagefright: Fix unused variables, functions, valuesAndreas Gampe2014-11-252-3/+1
| | | | | | | For build-system CFLAGS clean-up, remove unused functions and variables. Change-Id: Ic3dee56b589ea9a693efa1d72ba394036efff168
* Remove check for an impossible conditionBernhard Rosenkraenzer2014-10-041-4/+0
| | | | | | | | offset_for_ref_frame is an array rather than a pointer - it can't be NULL (and the check causes a warning in clang). Change-Id: I9b96e1e723e3b8caebd41821137ed6fb669d8cd4 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* avcenc: Only do startcode escaping if the next byte requires itMartin Storsjo2014-02-111-6/+9
| | | | | | | | | | | | Section 7.4.1 in the H.264 standard says that the only valid bytes to follow a sequence that starts with 0x000003 are 0x00, 0x01, 0x02 or 0x03. This makes EncodeDecodeTest pass properly when decoding using OMX.google.h264.decoder, which is strict about the forbidden escape sequences. Change-Id: Ice113d9b934015003ea9cb10d0b21cee4d18d774
* avcenc: Update a comment about the inline assemblyMartin Storsjo2012-08-213-6/+3
| | | | | | | Since the inline assembly was fixed in commit 3fdb405597f the comment was no longer accurate. Change-Id: Id4f8a111d1fa6e0c2e97f7db64262e8d1604c519
* avcenc: Fix the gcc inline assembly constraintsMartin Storsjo2012-08-203-17/+17
| | | | | | | | | | | | | | | | | Use +r for registers whose value is used as input to the block. Also switch input registers to output registers with +r, for registers that are modified by the assembly block (SUB_SAD in sad_inline.h). Without this, the inline assembly fails on modern gcc versions (tested on gcc 4.6), where the intended input value never is loaded into the registers, causing segfaults at runtime. Currently this assembly isn't used, but this change makes it work properly if enabled. Change-Id: I37c247cd5c8aff213445e31ab3bd33d8f0f37e05
* avcenc: Properly indent assembly blocksMartin Storsjo2012-08-203-18/+108
| | | | | | | Also line break multiline assembly blocks - previously they were virtually unreadable. Change-Id: Icb269909b78746e26b28ab7dcb6979c4655a0b0c
* Merge "avcenc: Clarify the ifdefs surrounding inline assembly"Jean-Baptiste Queru2012-08-163-3/+12
|\
| * avcenc: Clarify the ifdefs surrounding inline assemblyMartin Storsjo2012-07-103-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the code was structured like this: #if defined(__GNUC__) && defined(__arm__) /* Generic C implementation */ #elif defined(__CC_ARM) /* RVCT version */ #elif defined(__GNUC__) && defined(__arm__) /* GCC arm assembly version */ #endif This had two implications - the gcc arm version never was used in practice, and the code required -D__arm__ to build at all for other architectures. The inline assembly constraints are buggy (requires changes so as to not crash), and if fixed, the optimizations still aren't faster than the generic C code on modern gcc versions. Therefore, just ignore them and use the generic C code. Due to the peculiar code block ordering and preprocessor conditions, the generic C code is what has been used before anyway, but it did require -D__arm__ to build, which can cause problems if building for other architectures, if the system headers have ifdefs for this define. This change makes it build without that define. Change-Id: Ib3fcf5651ee720310b7dff10fd04279b5f90759c
* | Merge "avcenc: Remove redundant zero-initialization of allocated memory"Jean-Baptiste Queru2012-08-082-10/+0
|\ \
| * | avcenc: Remove redundant zero-initialization of allocated memoryMartin Storsjo2012-07-122-10/+0
| | | | | | | | | | | | | | | | | | | | | The allocation callback is now supposed to always return initialized memory. Change-Id: I7a4d036e498c9f87c730dda3aab5057eb764a1e7
* | | Merge "avcenc: Remove useless casts"Jean-Baptiste Queru2012-08-081-2/+2
|\ \ \
| * | | avcenc: Remove useless castsMartin Storsjo2012-07-101-2/+2
| |/ / | | | | | | | | | Change-Id: I73a6f74268bcf6ca22d489d13936be8fd1b3fc92
* | | Merge "avcenc: Fix indentation"Jean-Baptiste Queru2012-08-081-2/+2
|\ \ \ | |/ / |/| |
| * | avcenc: Fix indentationMartin Storsjo2012-07-101-2/+2
| |/ | | | | | | Change-Id: I4fcdf619e3b75387a7909272f3164b8d608b6cc2
* | avcenc: Switch malloc/free callbacks to use pointers instead of intsMartin Storsjo2012-07-104-23/+23
|/ | | | | | | | There is no reason for casting the pointers to ints. This fixes building the code on platforms where pointers are larger than ints, e.g. 64 bit platforms. Change-Id: I910cd207d0908287931c9a96eb270139967e029b
* stagefright avcenc: Use intptr_t for casting pointers to integersMartin Storsjo2012-05-213-9/+9
| | | | | | | This is used for doing integer arithmetic on the pointers, for checking pointer alignment. Change-Id: I7a7ff834dc631ac9cce90e46216f64645e1ae6e5
* stagefright avcenc: Switch tmp variables to use the right type, to avoid castingMartin Storsjo2012-05-211-50/+46
| | | | | | | This fixes building on platforms where int is smaller than pointers, e.g. 64 bit platforms. Change-Id: I3da0459bac10cbffd1db699bf4782fe926cd391f
* Fix simulator buildJames Dong2010-07-131-0/+3
| | | | | | | - missing header file <string.h> - need to define -D__arm__ Change-Id: I18d2f1908684150784cf728234b5aedbc02447d1
* Initial checkin for software AVC encoderJames Dong2010-07-1321-0/+17286
- Since the software encoder assumes the input is YUV420 planar, color conversion needs to be added when the input color format does not meet the requirement. With this patch, I only added a single color conversion from YUV420 semi planar to YUV420 planar. We can add more as we go. Change-Id: If8640c9e5a4f73d385ae9bb2022e57f7f62b91b9