summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
Commit message (Collapse)AuthorAgeFilesLines
* stagefright aacenc: Make the mem_malloc function 64-bit safeMartin Storsjo2011-06-221-2/+7
| | | | Change-Id: I720109133bf5e13388b26a3bdbd66ff1f5320b70
* Merge "stagefright aacenc/amrwbenc: Convert line breaks to Unix style"Conley Owens2011-06-09185-30089/+30089
|\
| * stagefright aacenc/amrwbenc: Convert line breaks to Unix styleMans Rullgard2011-04-23185-30089/+30089
| | | | | | | | Change-Id: I6219725a9fbd72432bad71a176c14f26fabdbd5f
* | MP3Extractor and MP3 decoder fixes - DO NOT MERGEJames Dong2011-03-111-2/+4
|/ | | | | | | | | | | | | | cherry-picked the following patches from HC branch: o PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits o Do not enforce the rule in MP3Extractor that all audio frames in an mp3 file must have the same mode o When the temp buffer wraps around, the next read position should start from what have been read to avoid reading the same remaining bytes in the buffer again. o Speed up MP3Extractor using cached reads bug - 4083532 Change-Id: I7bbd2bd358fd5ee322287866cb8ee0c2bb217fea
* DO NOT MERGE: Support non-multiple-of-16 dimensions in MPEG4/H.263 software ↵Andreas Huber2011-01-243-9/+23
| | | | | | | decoder Change-Id: I6c27c00a6e13cb3635e61089c0db0989f5810c37 related-to-bug: 3384367
* Assume that all of the decoded vorbis audio data is valid unless the source ↵Andreas Huber2010-10-261-6/+14
| | | | | | indicates otherwise. Change-Id: Iea88e3f09955d82a9a11fbcc075db8d9c4007490
* Include the framework copy of the OpenMAX headers instead of referencing ↵Andreas Huber2010-10-155-5/+5
| | | | | | | external/opencore. Change-Id: I762f59acf5e1f770e4d7c2d89af362bfffebefa6 related-to-bug: 3101573
* Increase scratch buffers sizes in mp3 software decoder, this integrates a PV ↵Andreas Huber2010-10-073-4/+4
| | | | | | | master/opensource patch. Change-Id: I5a637f1b380e44c94040ec507843d58a1f5a9b61 related-to-bug: 3065605
* Squashed commit of the following:Andreas Huber2010-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | commit 46744c7697f29aec71aed8de3c95ce035c284d97 Author: Andreas Huber <andih@google.com> Date: Thu Sep 30 16:44:57 2010 -0700 better separation of access units Change-Id: I5a9e2138aed341f0bcf22cfe368a15ca5ea5a73c commit d34952ac0feb1ae722ff65824d7353335502219b Author: Andreas Huber <andih@google.com> Date: Thu Sep 30 15:35:01 2010 -0700 Support for ES packets that do not start on PES packet boundaries. Change-Id: I2cf012833948eddfb20b16a1901206cf22ce71e4 related-to-bug: 2368598 Change-Id: Ib9329bd6bb7149b5a6e2483788a96b1b158952fc
* Merge "AMRNB: use Frame_Type_3GPP defined in frame_type_3gpp.h instead." ↵Chia-chi Yeh2010-09-283-55/+19
|\ | | | | | | into gingerbread
| * AMRNB: use Frame_Type_3GPP defined in frame_type_3gpp.h instead.Chia-chi Yeh2010-09-293-55/+19
| | | | | | | | | | | | | | This allows gsmamr_enc.h and gsmamr_dec.h to be included in the same file without conflict definition. Change-Id: I1c8dac235c122735ba14a1af2fda48c0f8d9f87b
* | Properly flush the AudioTrack/AudioSink on a seek request and make sure that ↵Andreas Huber2010-09-282-0/+8
| | | | | | | | | | | | | | both the mp3 decoder and aac software decoders start fresh after a seek without any dependency on previously decoded content. Change-Id: I4909fdf19518dbabb6c340e2a31b50dfe6c5b067 related-to-bug: 3029947
* | Vorbis files may have more samples encoded that should be used, i.e. we have ↵Andreas Huber2010-09-281-0/+18
|/ | | | | | | to trim samples at the end of the stream. This is crucial for proper looping of some audio files. related-to-bug: 3036592 Change-Id: Ib142b171c829ed74156c0281d9d4543fcc96c802
* Make sure we drain the avc software decoder's output queue once we run out ↵Andreas Huber2010-09-221-43/+53
| | | | | | of input data. Change-Id: I3d92ebae4951b618a6dfcf42936cc4c63d4de539
* Another attempt for fixing AAC+/eAAC+ related issueJames Dong2010-09-201-12/+57
| | | | | | | | | The decoder has to decode the very first two frames (decoder specific data + first data frame) in order to be really sure whether a stream is AAC or AAC+/eAAC+. bug - 2966336 Change-Id: Ib12a07285933df0d6c346370a12f70e99e811881
* Sometimes the avc software decoder will signal that a frame is ready but ↵Andreas Huber2010-09-161-4/+11
| | | | | | | then unexpectedly fail to return the frame... stop asserting on that and return an error instead. Change-Id: I6c0782b51b57e9be0fd410bd34078dc3c2b088d6 related-to-bug: 3005156
* Upgrade to the latest .webm project code.Andreas Huber2010-09-151-5/+7
| | | | Change-Id: I645eff9b7c10bf33144977e6093663407af402e2
* HW audio encoder expects timestamp via kKeyTime from each input bufferJames Dong2010-09-083-3/+3
| | | | | | - This fixes media server crashes on droid Change-Id: I7191cadc5275107425ec3ee3d437b2c5295858dc
* Not all audio source has the drift time informationJames Dong2010-09-033-12/+15
| | | | Change-Id: I74e502376348ca4a6ffaa7492bed35c1355e7e62
* Calculate audio media drift time from AudioSourceJames Dong2010-09-013-8/+39
| | | | | | | | | | | | | | | | | | | The problem was that the time to receive an output buffer from an audio encoder is different because the encoder does not need to read from the source for all output buffers. This leads to large fluctuation in terms of wall clock duration between two neighboring audio sample outputs from the audio encoder. As a result, the media time for the video track after adjustment using the drifting changes wildly sometimes. This patch addresses this issue by only updating the media drift time when an audio source input buffer is read. the wall clock for the audio track is also calculated at the same time when the input audio buffer is read at AudioSource. bug - 2959800 Change-Id: I3174aa182f744784b540f0a7198524d4eee8bd7b
* 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-122-2/+2
| | | | | | | | | 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-122-2/+27
| | | | | | 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-102-0/+20
| | | | 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
* Support for extracting G.711 a-law and mu-law audio from WAV files and a ↵Andreas Huber2010-08-093-0/+229
| | | | | | | corresponding software decoder. Change-Id: I92685d09456c220b8c09842defb721bd55b0b9f6 related-to-bug: 2900021
* Don't return a decoder error if the encoded stream does not start with SPS/PPS.Andreas Huber2010-08-041-130/+146
| | | | Change-Id: I960ada0c53f8ffe413ecd07c2c754a996841f592
* Allows the authoring engine to skip frame.James Dong2010-07-221-0/+1
| | | | | | | | | | | This is 1st part of the work to allow audio and video resync if we found out that audio and video are out of sync during authoring - also fixed a problem in AACEncoder::read() where the buffer acquired from the buffer group does not release when error out at reading from source. Change-Id: I8a2740097fcfdf85e6178869afeb9f3687a99118
* Support finer seek control on MediaSources.Andreas Huber2010-07-2111-22/+157
| | | | | | related-to-bug: 2858448 Change-Id: Ifb4b13b990fd5889113e47e2c62249ac43391fa1
* Merge "Progress status notification" into gingerbreadJames Dong2010-07-201-1/+0
|\
| * Progress status notificationJames Dong2010-07-201-1/+0
| | | | | | | | | | | | - Keep track of per-track progress Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
* | Fix MPEG4Extractor to extract sampling frequency correctly when SBR is enabled.James Dong2010-07-191-9/+13
| | | | | | | | Change-Id: I883c81dad3ea465e71cb5590e89d763671a90ff8
* | Fix simulator build (1st attempt)James Dong2010-07-181-0/+1
|/ | | | Change-Id: I65a824c17929170b7b2bc75a13e756e92d8fe50a
* Initial check-in for software m4v_h263 encoderJames Dong2010-07-1537-0/+26272
| | | | Change-Id: I4b49fa5c3a5e6e21cfd2419441d98dd784046367
* 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
* Enable the support for decoding audio with AAC+ and eAAC+ featuresJames Dong2010-07-081-45/+61
| | | | | | bug - 282684 Change-Id: I73c8377af3cc4edd3ee7cea86dc3b1c369fbd78b
* Added encoding parameters set up for H263 video encoderJames Dong2010-06-293-7/+24
| | | | | | | | Also: - Allowed start() call when encoder already starts and stop() call when encoder has not started yet - Handled default value for audio/video sources/encoders and file output format Change-Id: I03b2f7d3cf570baa0fd011a8c0ad200f2f2a5da1
* Fixed the software AAC encoderJames Dong2010-06-231-28/+52
| | | | | | | Make sure that each input frame contains at least 1024 samples, as required by the AAC encoder, and fix the incorrect timestamp. Change-Id: I344cafe8c89be51d6e64552fab70539990ff6049
* Fix a number of timestamp mismatches in the mp3 extractor and decoder that ↵Andreas Huber2010-06-231-27/+30
| | | | | | | would lead to invalid reporting of the current playback time for mono and/or non-44100 kHz mp3s. Change-Id: I11abc05b62a958ffbc99ca997cd184a2f2199352 related-to-bug: 2667479
* Audio/video sync during recording (second part)James Dong2010-06-213-3/+3
| | | | Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
* Initial checkin for pause and resume controlJames Dong2010-06-111-4/+7
| | | | Change-Id: Ibdcf7bea5fb66baa81878704ba4091dfcfe382ee
* Squashed commit of the following:Andreas Huber2010-05-243-0/+250
| | | | | | | | | | | | | | | | | | | | | commit a2194ecc341fa0c530d0007d8561286c8b8f2d15 Author: Andreas Huber <andih@google.com> Date: Fri May 21 12:50:09 2010 -0700 Instead of including the libvpx libraries prebuilt in our tree, build them from sources. Change-Id: I5ec57decf1200cf9137fe13ff77d06f47950c3d7 commit 711098ca3f16800a22ccdb26a07e57e471cca438 Author: Andreas Huber <andih@google.com> Date: Thu May 20 15:00:27 2010 -0700 Support for VPX/VP8 decoding in stagefright Change-Id: I16d93faf3f56a5f8ec39c14367704469f914db9e related-to-bug: 2483739 Change-Id: Ibc124f6af540c2715cb2325151eecdd6edf085ec
* Update software AVC decoder to no longer require the kWantsNALFragments hack.Andreas Huber2010-05-201-59/+88
| | | | Change-Id: I7f1882530a891a57d0cd76cbbd7084ee31c59bd1
* am 3c16154a: am 2723e092: Merge "Better handling of codec initialization ↵Andreas Huber2010-05-201-2/+9
|\ | | | | | | | | | | | | | | | | failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize." into froyo Merge commit '3c16154a3309fe250177d69f3fcd5b6e9a82d1b3' into kraken * commit '3c16154a3309fe250177d69f3fcd5b6e9a82d1b3': Better handling of codec initialization failure in the player and thumbnail extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize.
| * Better handling of codec initialization failure in the player and thumbnail ↵Andreas Huber2010-05-201-2/+9
| | | | | | | | | | | | | | extractor. Return a runtime error instead of asserting if the software MPEG4/H.263 decoder fails to initialize. Change-Id: I5cba02ee85a41e43c2623053de40f26e2cf2efe4 related-to-bug: 2699505
* | Initial software encoder checkinsJames Dong2010-05-19209-17/+44004
|/ | | | Change-Id: I27f387db23594e46384c4eb3a0093ce220bb6b60
* Return a runtime error instead of asserting if the AACDecoder is passed an ↵Andreas Huber2010-05-131-2/+4
| | | | | | | | unsupported config. Change-Id: Ie084ed4df5a5d286abd36d9149c2138f8e7ed08a related-to-bug: 2682221 QA-impact: none
* Better seek handling and proper reset of the vorbis decoder after a ↵Andreas Huber2010-05-111-8/+10
| | | | | | | | discontinuity (seek) Change-Id: I3c76d35da48e0964f7a0fa2816f8573b5e1a9436 related-to-bug: 2674036 QA-impact: low, only affects ogg-vorbis playback through http