summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DO NOT MERGE Verify OMX buffer sizes prior to accessMarco Nelissen2016-04-211-0/+16
| | | | | Bug: 27207275 Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
* am 051b8572: am 91860b89: SoftAVCEncoder: fix auto merge error, member names ↵Wei Jia2015-08-201-1/+1
|\ | | | | | | | | | | | | have changed. * commit '051b8572c2751781925c0e58698dcbb52c8e268e': SoftAVCEncoder: fix auto merge error, member names have changed.
| * SoftAVCEncoder: fix auto merge error, member names have changed.Wei Jia2015-08-171-1/+1
| | | | | | | | | | Bug: 20674674 Change-Id: I511c22d59789e1cc3a21fe13ea08ac3752e737c6
* | am e264b770: am d9d6c465: am 5d1e62e2: am 9cebcc5f: Merge "SoftAVCEncoder: ↵Wei Jia2015-08-201-1/+1
|\ \ | |/ | | | | | | | | | | fix mismatched type for comparison." into lmp-dev * commit 'e264b770b41eff604ca730ef9172c249b652557b': SoftAVCEncoder: fix mismatched type for comparison.
| * am 5d1e62e2: am 9cebcc5f: Merge "SoftAVCEncoder: fix mismatched type for ↵Wei Jia2015-08-181-1/+1
| |\ | | | | | | | | | | | | | | | | | | comparison." into lmp-dev * commit '5d1e62e24628e86fc0485113db18b31973a5cf4b': SoftAVCEncoder: fix mismatched type for comparison.
| | * SoftAVCEncoder: fix mismatched type for comparison.Wei Jia2015-08-171-1/+1
| | | | | | | | | | | | | | | Bug: 20674674 Change-Id: Iace5b8c882339b3a9d2e706375255aeeeb0532fe
* | | am 50b600d6: am ab33de61: am 78df80c2: am 65842db0: Merge commit ↵Wei Jia2015-08-201-0/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | \'b46eb8d9\' into HEAD * commit '50b600d66eb87bccf8010f30bece4e1f135322d1': SoftAVCEnc: check requested memory size before allocation.
| * | am 78df80c2: am 65842db0: Merge commit \'b46eb8d9\' into HEADWei Jia2015-08-181-0/+8
| |\ \ | | |/ | | | | | | | | | * commit '78df80c26352bdbe3dc3725a6d937f60fc340127': SoftAVCEnc: check requested memory size before allocation.
| | * Merge commit 'b46eb8d9' into HEADWei Jia2015-08-171-0/+8
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoftAVCEnc: check requested memory size before allocation. Bug: 20674674 (cherry picked from commit f6fe4340219a8e674f3250fe32d4697ec8184b24) Change-Id: Ib52a26de912fd5a9a08dd9948885fb4a9b32e9e6
| | | * am 479b4de0: SoftAVCEnc: check requested memory size before allocation.Wei Jia2015-08-181-0/+12
| | | |\ | | | | | | | | | | | | | | | | | | | | * commit '479b4de0d267eb7d4c419f4da0069186a952ad17': SoftAVCEnc: check requested memory size before allocation.
| | | | * SoftAVCEnc: check requested memory size before allocation.Wei Jia2015-08-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20674674 Change-Id: I569e7a9b33fe64779a40e55539929c3dc4303c19 (cherry picked from commit f6fe4340219a8e674f3250fe32d4697ec8184b24)
| | | | * am a923dd4e: am 1b0ae9e4: Merge "avcenc: Set OMX_BUFFERFLAG_EOS on the last ↵Jean-Baptiste Queru2012-09-121-0/+3
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output frame" * commit 'a923dd4e6c14f5cba2fc5f6f152619ec6bc70c5d': avcenc: Set OMX_BUFFERFLAG_EOS on the last output frame
| | | | * \ am bf30787f: am 735d1b92: Merge "avcenc: Don\'t erase the InputBufferInfo ↵Jean-Baptiste Queru2012-08-291-1/+1
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before reading info from it" * commit 'bf30787f2694057e775f3b527b649a9f8074237b': avcenc: Don't erase the InputBufferInfo before reading info from it
* | | | | \ \ resolved conflicts for merge of 6571ed31 to lmp-mr1-dev-plus-aospLajos Molnar2014-12-111-292/+59
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | Change-Id: Ibaea3a0766f75a61964615482a9ef28651a42b37
| * | | | | | stagefright: misc fixes to software video encoders (and decoders)Lajos Molnar2014-12-101-292/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - move logic to set encoder parameters to common encoder class (similarly to what was done for decoders) - set compressed buffer size based on frame size and compression ratio, and codec-specific minimum size - set raw buffer size based on frame size and metadata mode - do not set stride and slice height on compressed ports - advertise only QCIF support for google H263 encoder - set large-enough input size for video decoders to support adaptive playback - do not change input buffer size on output port reconfiguration, as no input buffer reallocation takes place - do not return empty buffers with EOS after EOS has been signaled Bug: 18513091 Bug: 18639027 Change-Id: Ib13492ef66adf331aa4572c67d2b283ea020cb41
* | | | | | | Merge "libstagefright: set actual stride info for SW encoder input port" ↵Lajos Molnar2014-10-281-0/+4
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev automerge: 701b964 automerge: 294c7f3 * commit '294c7f36e6a92419017e7fe2a204fba1284cdc08': libstagefright: set actual stride info for SW encoder input port
| * | | | | | libstagefright: set actual stride info for SW encoder input portLajos Molnar2014-10-251-0/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes encoding flexible YUV content using SW encoders. Also skip setting input color format if it is flexible YUV, as it has already been translated to a color format supported by the codec. Bug: 18124320 Change-Id: I423782936986f4d6cf65ea9ef89ae77a92e30140
* | | | | | resolved conflicts for merge of f4147ee9 to lmp-mr1-dev-plus-aospLajos Molnar2014-10-141-103/+17
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | Change-Id: I3b66673012989ab3707852b257844f2c3851f753
| * | | | | stagefright: fix surface input handling of software encodersLajos Molnar2014-10-131-97/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added SoftVideoEncoder for common color conversion and extension handling logic - fix YUV420 SemiPlanar handling that should be NV12 not NV21 Bug: 17935149 Change-Id: I9b8d05678b1862dd37bf349ea83d67bdf1bb5560
* | | | | | am 13006b9d: am 032ecb7f: Merge "Fix in SoftAVCEncoder plugin"Narayan Kamath2014-09-041-3/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '13006b9d0586d17a0ea52e98124b54ebf6246feb': Fix in SoftAVCEncoder plugin
| * \ \ \ \ \ Merge "Fix in SoftAVCEncoder plugin"Narayan Kamath2014-09-041-3/+4
| |\ \ \ \ \ \
| | * | | | | | Fix in SoftAVCEncoder pluginAshok Bhat2014-07-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | size of buffer_handle_t, a pointer type, was assumed to be 4 bytes. This patch uses sizeof(buffer_handle_t) instead. In addition, replaced magic number 4 with sizeof(OMX_U32) Change-Id: Id5a7ed805a7b8e9867d8e51655cd334a66ac2c2b Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* | | | | | | | am 24a5a7c3: am b7a88e31: Merge "h264_enc: Use free() to release memory ↵Narayan Kamath2014-07-141-2/+2
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | / / / / / | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | allocated with malloc()" * commit '24a5a7c30ad041971ca511f4c7f784936090dfc6': h264_enc: Use free() to release memory allocated with malloc()
| * | | | | | h264_enc: Use free() to release memory allocated with malloc()Ashok Bhat2014-06-251-2/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mInputFrameData and mSliceGroup are allocated memory with malloc() but released using delete. Changed this to use free() instead. Change-Id: Iecf6684d97fabb2229d9abd94279a24faf9ac2d7 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
| * | | | | media: memset sizeof argument issuesMark Salyzyn2014-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I37ef154eea0f77fb7f22faf6891f3025f6ff346e
* | | | | | Merge commit '52a23bd3' into manualmergeGlenn Kasten2014-04-031-2/+2
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | Change-Id: I7a6105f467a2fa3631c62be3d306845e9cf9b365
| * | | | | 64-bit: Correction to OMX_U32 and OMX_S32Glenn Kasten2014-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9c41bb34c35595ac19a7ab8faaacde8cb4fa9a15
* | | | | | Even more warnings (now errors) fixed to unbreak the sdk-x86 build(s).Andreas Huber2014-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib4a5ab1a9e50fe9e7747a907f8b4a8c207099fdb
* | | | | | warnings be gone.Andreas Huber2014-02-111-4/+11
|/ / / / / | | | | | | | | | | | | | | | Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
* | | | | avcenc: Update video port parameters in the base classMartin Storsjo2013-11-211-0/+11
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that the right parameters are returned on both input and output ports if queried after setting. This also makes sure that the output MediaFormat from the MediaCodec class contains the right video size. Change-Id: I0667b3b4c6bb90331ad0ae7d51388e1bca3d1bbd
* | | | avcenc: Prepend startcodes to output buffersMartin Storsjo2013-09-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the encoder output data that is similar to what actual HW encoders output. This form is also what is expected by virtually every other component - the only exception seems to be stagefright's MPEG4Writer which happens to work with this format. This also makes the encoder's output work in other decoders when passing through directly. If feeding the encoded data straight through to a decoder (such as in the EncodeDecodeTest CTS test), the output from OMX.google.h264.encoder cannot be decoded by e.g. OMX.Nvidia.h264.decode on a Nexus 7 or OMX.SEC.avc.dec on a Galaxy S3. Change-Id: I6e16433a4a66936e3080723c8233681f53bd55e5
* | | | am a923dd4e: am 1b0ae9e4: Merge "avcenc: Set OMX_BUFFERFLAG_EOS on the last ↵Jean-Baptiste Queru2012-09-121-0/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | output frame" * commit 'a923dd4e6c14f5cba2fc5f6f152619ec6bc70c5d': avcenc: Set OMX_BUFFERFLAG_EOS on the last output frame
| * | | Merge "avcenc: Set OMX_BUFFERFLAG_EOS on the last output frame"Jean-Baptiste Queru2012-09-121-0/+3
| |\ \ \ | | |_|/ | |/| |
| | * | avcenc: Set OMX_BUFFERFLAG_EOS on the last output frameMartin Storsjo2012-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Without this, the caller might hang waiting for more output buffers. Change-Id: Ief6be00b7600be8498a953e8e88f0582ea8fce85
* | | | am bf30787f: am 735d1b92: Merge "avcenc: Don\'t erase the InputBufferInfo ↵Jean-Baptiste Queru2012-08-291-1/+1
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | before reading info from it" * commit 'bf30787f2694057e775f3b527b649a9f8074237b': avcenc: Don't erase the InputBufferInfo before reading info from it
| * | avcenc: Don't erase the InputBufferInfo before reading info from itMartin Storsjo2012-08-291-1/+1
| |/ | | | | | | | | | | | | | | | | | | Previously, the timestamp and flags were read from the InputBufferInfo struct after it had been erased. This fixes cases where the output timestamp from the avc encoder could spuriously be garbage every now and then. Change-Id: I21acf23cfac93bcc201a603feace6499ec6d8e76
* | am 44237a8d: am b71298ee: Merge "avcenc: Initialize all memory allocated by ↵Jean-Baptiste Queru2012-08-081-1/+4
|\ \ | |/ | | | | | | | | | | the CBAVC_Malloc callback function" * commit '44237a8d58dc218257687f2cbe8fd33d73a713e8': avcenc: Initialize all memory allocated by the CBAVC_Malloc callback 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
* | am 80c46255: am 874a074a: Merge "avcenc: Switch malloc/free callbacks to use ↵Jean-Baptiste Queru2012-08-081-4/+4
|\ \ | |/ | | | | | | | | | | pointers instead of ints" * commit '80c46255bcf3d4d5a3ffe9a1ef3aefd9310c6ed4': avcenc: Switch malloc/free callbacks to use pointers instead of ints
| * avcenc: Switch malloc/free callbacks to use pointers instead of intsMartin Storsjo2012-07-101-4/+4
| | | | | | | | | | | | | | | | 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
* | Codecs: Add MetaDataMode support to software video encoders.Eino-Ville Talvala2012-07-241-8/+112
|/ | | | | | | | | | | | | | This support is needed to enable efficient video recording with emulator and camera HAL 2. - Update SoftAVCEncoder and SoftMPEG4Encoder to support MetaDataMode extension. - Allow CameraSource to handle opaque pixel formats, so that MetaDataMode can be used. - Remove hardware codec restriction for MetaDataMode Bug: 6243944 Change-Id: I970eb3d55542a413b6d75a78f76d3a8583155601
* Software AVC encoder is now OMX-basedJames Dong2012-04-241-0/+890
o related-to-bug: 6383440 Change-Id: I0b1ae50a704b0979857ea447585eabe86602149a