summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc/enc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* avcenc: Remove a leftover defineMartin Storsjo2012-08-171-1/+0
| | | | | | | | | This should have been removed as part of f5af6314db, but the second __arm__ define was introduced after the original commit was written, and not removing the second one was an oversight in rebasing the patch on top of the new code. Change-Id: Iccf08ffdef130446dd6e97dc1e15e6a1d4f9386f
* Merge "avcenc: Clarify the ifdefs surrounding inline assembly"Jean-Baptiste Queru2012-08-164-4/+12
|\
| * avcenc: Clarify the ifdefs surrounding inline assemblyMartin Storsjo2012-07-104-4/+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: Initialize all memory allocated by the CBAVC_Malloc callback ↵Jean-Baptiste Queru2012-08-081-1/+4
|\ \ \ | |/ / | | | | | | function"
| * | avcenc: Initialize all memory allocated by the CBAVC_Malloc callback functionMartin Storsjo2012-07-121-1/+4
| | | | | | | | | | | | | | | | | | | | | Valgrind reported use of uninitialized memory in AVCEncodeSlice, which this fixes. Change-Id: Ia09ad3e50d05b2b0487a4d588d9b00fc0828c816
* | | 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-105-27/+27
|/ | | | | | | | 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
* am e20435de: Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under ↵James Dong2012-06-132-0/+190
|\ | | | | | | | | | | | | /frameworks/av/" into jb-dev * commit 'e20435de10f63af812da9d4f801b61a8817733a0': Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/
| * Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/James Dong2012-06-132-0/+190
| | | | | | | | | | Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26 related-to-bug: 6647465
* | 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
* Removed software video encoders that are not OMX-based.James Dong2012-04-302-621/+0
| | | | | | o related-to-bug: 5933287 Change-Id: I63635375e2bef00733b61adc3fa12c29df7e2155
* Software AVC encoder is now OMX-basedJames Dong2012-04-243-0/+1036
| | | | | | o related-to-bug: 6383440 Change-Id: I0b1ae50a704b0979857ea447585eabe86602149a
* AV Android make files changesJames Dong2012-03-281-1/+1
| | | | | | | o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc o remove some runtime dependencies to libandroid, libandroid_runtime, etc Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10
* Switched to use the header files in /frameworks/nativeJames Dong2012-03-121-2/+2
| | | | | | | | and deleted the duplicate header files in /frameworks/base o related-to-bug: 6044887 Change-Id: I17e0692d9a9b5c8796ded36677c833ca8ab36795
* Move away from MediaDebug and use ADebug insteadJames Dong2012-02-101-4/+4
| | | | Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-7/+7
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-2/+2
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-10/+10
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Return ERROR_END_OF_STREAM when the input source reaches eosJames Dong2011-06-291-1/+3
| | | | Change-Id: I334313b054dcf388d2e05d56efb10ceea4980638
* If camera source uses the metadata, we must use HW encoderJames Dong2010-12-021-1/+1
| | | | | | | | Software video encoders are not able to deal with non-YUV metadata in the video buffer sent from camera bug - 3242213 Change-Id: I97361ed88b2a687190e5129459011afff7f32c2d
* Separate the key for audio sampling rate and video frame rate in MetaData.hJames Dong2010-11-111-2/+2
| | | | Change-Id: Ia33befaa7e6df8762703002d01aa79c04f15f040
* Added profile and level translation in SW video encodersJames Dong2010-10-271-2/+82
| | | | Change-Id: I6b9c33c7e4b497f3dc61b2a0dcf4e65727f9bcdd
* Include the framework copy of the OpenMAX headers instead of referencing ↵Andreas Huber2010-10-151-1/+1
| | | | | | | external/opencore. Change-Id: I762f59acf5e1f770e4d7c2d89af362bfffebefa6 related-to-bug: 3101573
* Only add 4 bytes offset for the output media buffer when SPS is not received ↵James Dong2010-08-191-5/+10
| | | | | | for SW AVC encoder Change-Id: Ia64c2751b6304e5d5891416bf23ff9b8ec54d5ef
* Mainly fix two mistakes that I made:James Dong2010-08-121-0/+1
| | | | | | | | | 1. When the ERROR_END_OF_STREAM is returned from read, the input buffer is not initialized release it would lead to crash 2. The mPrevTimestampUs is not initialized and thus fail in the CHECK(mPrevTimestampUs, timeUs) Change-Id: Id1e51575fb8b3ca48e80547efd3a3a82dfac773b
* Fix software avc encoder crash at EOS.Andreas Huber2010-08-121-2/+0
| | | | Change-Id: I738dc24556e41ce518b67babeff16cd934c2d1b1
* Don't send late frames to software encoders for encodingJames Dong2010-08-121-0/+16
| | | | | | o Document on what frames will be rejected and what frames will be accepted Change-Id: I5a5d489ad3d2b50dbb40a0f6e01529312ce81c54
* Add input buffer size check for software video encodersJames Dong2010-08-101-0/+10
| | | | Change-Id: I03953a1245060ed6656a965e1a8a61386126c441
* Only check the codec specific data when the output buffer contains ↵James Dong2010-08-101-7/+22
| | | | | | | | | | | | | | kKeyIsCodecConfig in MP4 writer o Assume there is only a single output buffer containing such information. This simplifies the logic in MP4 file writer o Output SPS and PPS in the very first buffer for software AVC encoder This is to make AVC encoder work with the MP4 file writer o Add timestamp value for codec config data Change-Id: Iad27a04579e6028332429cd0bebd30976041e997
* Fix simulator buildJames Dong2010-07-132-0/+4
| | | | | | | - missing header file <string.h> - need to define -D__arm__ Change-Id: I18d2f1908684150784cf728234b5aedbc02447d1
* Initial checkin for software AVC encoderJames Dong2010-07-1323-0/+17812
- 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