summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Add a bunch of missing includes.thestig@chromium.org2010-05-101-1/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2018001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46850 0039d316-1c4b-4281-b951-d872f2087c98
* ffmpeg audio convert float to int samples immediately after decodefbarchard@chromium.org2010-05-071-0/+62
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1969004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46728 0039d316-1c4b-4281-b951-d872f2087c98
* Add EGLImage as one media type different than regular uncompressed video buffer.scherkus@chromium.org2010-05-0515-23/+96
| | | | | | | | | | | | | | Video renderer could get this info via decoder->media_format(). This is needed in case video renderer is the buffer allocator. Patch by wjia@chromium.org: http://codereview.chromium.org/1725021/show BUG=NONE TEST=compiles Review URL: http://codereview.chromium.org/1952003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46479 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 46314 - floating point audio support in util functions for volume and ↵fbarchard@chromium.org2010-05-043-65/+29
| | | | | | | | | | | | | | folding BUG=42861 TEST=none Review URL: http://codereview.chromium.org/1856002 TBR=fbarchard@chromium.org Review URL: http://codereview.chromium.org/1926001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46320 0039d316-1c4b-4281-b951-d872f2087c98
* floating point audio support in util functions for volume and foldingfbarchard@chromium.org2010-05-043-29/+65
| | | | | | | | | BUG=42861 TEST=none Review URL: http://codereview.chromium.org/1856002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46314 0039d316-1c4b-4281-b951-d872f2087c98
* scaler_bench is a simple benchmark that can be used to measure performance ↵sergeyu@chromium.org2010-05-031-0/+12
| | | | | | | | | | | | | | | of our image scaling code. In this version it times performance of image scaling using Skia, and using Chromium's own scaler with and without filtering. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44950 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45067 Review URL: http://codereview.chromium.org/1518034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46289 0039d316-1c4b-4281-b951-d872f2087c98
* Use FFmpeg's reordered_opaque for presentation timestamp reordering.scherkus@chromium.org2010-04-286-43/+88
| | | | | | | | | | | | | | | This fixes numerous audio/video synchronization issues caused by PtsHeap getting out of sync due to the decoder silently dropping/reordering frames. Most decoder libraries (including FFmpeg and OpenMAX) feature some form of presentation timestamp reordering. This is the first step in moving away from using PtsHeap and instead requireing VideoDecodeEngines + their libraries to handle presentation timestamp reordering. This change also removes VideoFrame::GetRepeatCount() as it is an FFmpeg-specific detail. The duration is now properly calculated inside FFmpegVideoDecodeEngine. BUG=26036 TEST=videos linked in bugs remain in sync, as do all other videos Review URL: http://codereview.chromium.org/1726015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45856 0039d316-1c4b-4281-b951-d872f2087c98
* Fix nested ifs and incorrect indentation in ffmpeg_video_decode_engine.cc.scherkus@chromium.org2010-04-281-40/+42
| | | | | | | | | | | No logic change, just inserting returns and de-nesting ifs. BUG=none TEST=media_unittests Review URL: http://codereview.chromium.org/1735012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45788 0039d316-1c4b-4281-b951-d872f2087c98
* Remove OmxSink interface because Buffer Allocation will go through Allocator ↵jiesun@google.com2010-04-2710-520/+90
| | | | | | | | | | in the future, and all allocation required parameters will be passed to "Allocator factory" during intiailized phase of render/decoder. Remove OMX_BUFFERHEADERTYPE merge logic, this is based on assumptions that all vendor will use one frame per buffer scheme instead of one slice(multiple rows) per buffer which is specified by OpenMAX IL Spec. Review URL: http://codereview.chromium.org/1786001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45705 0039d316-1c4b-4281-b951-d872f2087c98
* Merging SeekableBuffer and BufferQueue:sergeyu@chromium.org2010-04-279-460/+236
| | | | | | | | | | | | 1. Removed SeekableBuffer::Buffer. 2. Extended SeekableBuffer to support all the features of BufferQueue. 3. BufferQueue removed and replaced with SeekableBuffer. BUG=28654 TEST=none Review URL: http://codereview.chromium.org/1736012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45669 0039d316-1c4b-4281-b951-d872f2087c98
* Remove AVFrame dependency.jiesun@google.com2010-04-2311-230/+250
| | | | | | | | | | | | | Currently AVFrame is used in both OmxVideoDecodeEngine and FFmpegVideoDecodeEngine. This causes an unnecessary memory copy from AVFrame to VideoFrame. We can remove the additional copy by using VideoFrame. Also in the hardware (OpenMAX) path, VideoFrames are allocated inside decode engines, therefore the interface was changed such that VideoFrames are created inside the decode engines but buffered in VideoDecoderImpl. BUGS=none TEST=none Review URL: http://codereview.chromium.org/1669002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45448 0039d316-1c4b-4281-b951-d872f2087c98
* Vertical Scaler better pipelined for Atomfbarchard@chromium.org2010-04-233-77/+105
| | | | | | | | | BUG=42064 TEST=sse2 version of scaling should be faster on Atom. No quality change. Review URL: http://codereview.chromium.org/1700010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45431 0039d316-1c4b-4281-b951-d872f2087c98
* OmxInputBuffer removed as it is not used anywhere.sergeyu@chromium.org2010-04-224-162/+0
| | | | | | | | | BUG=28654 TEST=none Review URL: http://codereview.chromium.org/1763006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45364 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the audio timestamp and duration code.scherkus@chromium.org2010-04-221-22/+14
| | | | | | | | | | | | | | While debugging this code I found it to be a tangled web of logic. The new version is much simpler: - Always calculate a duration (this makes sense anyway) - Use the estimated timestamp when one isn't available - Reset the estimated timestamp when a valid timestamp is available BUG=26036 TEST=everything still plays in sync Review URL: http://codereview.chromium.org/1695009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45339 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 45265 - Speed up vertical filtering using v = a+(ba)*x formulafbarchard@chromium.org2010-04-223-50/+39
| | | | | | | | | | | BUG=42064 TEST=unittests should still pass Review URL: http://codereview.chromium.org/1733004 TBR=jamesr@chromium.org Review URL: http://codereview.chromium.org/1718007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45270 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up vertical filtering using v = a+(b-a)*x formulafbarchard@chromium.org2010-04-213-39/+50
| | | | | | | | BUG=42064 TEST=unittests should still pass Review URL: http://codereview.chromium.org/1733004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45265 0039d316-1c4b-4281-b951-d872f2087c98
* Issues with video loopinghclam@chromium.org2010-04-2010-20/+43
| | | | | | | | | | | | | | | | | Some video streams are badly muxed and have video packets with timestamps greater than the duration. This causes the logic in the video renderer to sleep forever and never read the end-of-stream packet and thus the stream is never ended. This change adjusted the condition on when we should sleep and handle timestamp greater than duration as a special case. TEST=video loops BUG=41579 Review URL: http://codereview.chromium.org/1652011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45124 0039d316-1c4b-4281-b951-d872f2087c98
* scaler_bench is a simple benchmark that can be used to measure performance ↵sergeyu@chromium.org2010-04-202-0/+210
| | | | | | | | | | | | | of our image scaling code. In this version it times performance of image scaling using Skia, and using Chromium's own scaler with and without filtering. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44950 Review URL: http://codereview.chromium.org/1518034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45067 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 44950 - scaler_bench is a simple benchmark that can be used to ↵sergeyu@chromium.org2010-04-192-217/+0
| | | | | | | | | | | | | | measure performance of our image scaling code. In this version it times performance of image scaling using Skia, and using Chromium's own scaler with and without filtering. BUG=none TEST=none Review URL: http://codereview.chromium.org/1518034 TBR=sergeyu@chromium.org Review URL: http://codereview.chromium.org/1572047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44966 0039d316-1c4b-4281-b951-d872f2087c98
* scaler_bench is a simple benchmark that can be used to measure performance ↵sergeyu@chromium.org2010-04-192-0/+217
| | | | | | | | | | | of our image scaling code. In this version it times performance of image scaling using Skia, and using Chromium's own scaler with and without filtering. BUG=none TEST=none Review URL: http://codereview.chromium.org/1518034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44950 0039d316-1c4b-4281-b951-d872f2087c98
* code fix for video framejiesun@google.com2010-04-162-72/+63
| | | | | | Review URL: http://codereview.chromium.org/1623011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44774 0039d316-1c4b-4281-b951-d872f2087c98
* Filter YUV scaling at half size and below with center of pixelfbarchard@chromium.org2010-04-164-98/+156
| | | | | | | | | BUG=19113 TEST=use playerwtl and reduce size to half and turn filtering on/off. Should look better. Review URL: http://codereview.chromium.org/1625017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44760 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 2 memcpy() in the OpenMAX code pathhclam@chromium.org2010-04-1514-78/+126
| | | | | | | | | | | | Reviewed: http://codereview.chromium.org/1620012 Submitted for: wjia@chromium.org This also fixes new/delete mismatch in the last commit by using scoped_array for data. Review URL: http://codereview.chromium.org/1630026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44677 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Explicitly add a bunch of missing includes.thestig@chromium.org2010-04-153-3/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1623014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44635 0039d316-1c4b-4281-b951-d872f2087c98
* fix arm warningsfbarchard@chromium.org2010-04-155-162/+163
| | | | | | | | | BUG=19113 TEST=builds on arm Review URL: http://codereview.chromium.org/1553033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44608 0039d316-1c4b-4281-b951-d872f2087c98
* Make C, MMX and SSE2 all output the same resultsfbarchard@chromium.org2010-04-158-827/+682
| | | | | | | | | BUG=19113,41045 TEST=none. just cleanup and making all platforms produce the same results Review URL: http://codereview.chromium.org/1638008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44591 0039d316-1c4b-4281-b951-d872f2087c98
* fixed compilation problem with disabled SSEsergeyu@chromium.org2010-04-151-1/+1
| | | | | | | | | BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1559032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44584 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove 2 memcpy() for omx video decode input"hclam@chromium.org2010-04-1414-126/+78
| | | | | | | | | | Reverr r44537 as it introduces memory leaks. TBR=wjia@google.com, rsesek@chromium.org Review URL: http://codereview.chromium.org/1585038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44568 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 2 memcpy() for omx video decode inputhclam@chromium.org2010-04-1414-78/+126
| | | | | | | | | | | | Some refactoring to remove 2 memcpy() for encoded video data for OpenMAX. Submitted for: wjia@google.com Reviewer: http://codereview.chromium.org/1574024/show Review URL: http://codereview.chromium.org/1572037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44537 0039d316-1c4b-4281-b951-d872f2087c98
* Looping for audio / videohclam@chromium.org2010-04-141-3/+25
| | | | | | | | | | Fixed the looping problem with audio / video. BUG=39478 TEST=audio plays with looping Review URL: http://codereview.chromium.org/1620010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44502 0039d316-1c4b-4281-b951-d872f2087c98
* Incorrect chroma on the right border fixed.sergeyu@chromium.org2010-04-141-13/+12
| | | | | | | | | BUG=19113 TEST=Right border has correct color Review URL: http://codereview.chromium.org/1518027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44455 0039d316-1c4b-4281-b951-d872f2087c98
* quick fix for emms on linux 64fbarchard@chromium.org2010-04-141-2/+1
| | | | | | | | BUG=none TEST=build on linux 64 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44440 0039d316-1c4b-4281-b951-d872f2087c98
* player_wtl add hotkey CTRL-F for filtering on/offfbarchard@chromium.org2010-04-141-3/+3
| | | | | | | | | BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1547032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44439 0039d316-1c4b-4281-b951-d872f2087c98
* Disable SSE2 for Windows media playbackfbarchard@chromium.org2010-04-141-2/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1654001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44438 0039d316-1c4b-4281-b951-d872f2087c98
* YUV scale clamp horizontal pixels when filteringfbarchard@chromium.org2010-04-141-11/+22
| | | | | | | | | BUG=19113 TEST=scale up by 4x and watch right edge for texel wrap. Review URL: http://codereview.chromium.org/1560032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44437 0039d316-1c4b-4281-b951-d872f2087c98
* Too many audio hangs Leopardhclam@chromium.org2010-04-131-0/+1
| | | | | | | | | | | | | | | | | | BUG=30242 TEST=Go to this page: http://weston.ruter.net/projects/test-cases/chrome-mp3-audio-crash/ Click play and it won't hang. Opening (not) too many audio streams in Leopard will cause a deadlock in AudioQueue, freezing the browser process. Unfortunately there isn't a way to detect that in the AudioQueue API. So this change limits the number of streams allowed. The limit for Leopard is set to 15 and other OSes are 50. Review URL: http://codereview.chromium.org/1559024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44419 0039d316-1c4b-4281-b951-d872f2087c98
* Fix windows scaling bugfbarchard@chromium.org2010-04-131-4/+2
| | | | | | | | | BUG=41294 TEST=scale a video up on windows with filtering enabled. Review URL: http://codereview.chromium.org/1645004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44368 0039d316-1c4b-4281-b951-d872f2087c98
* include emmintrin for chrome linux to use mmx _m64 types.fbarchard@chromium.org2010-04-132-12/+10
| | | | | | | | | BUG=19113 TEST=build official chrome on linux 32 bit. Review URL: http://codereview.chromium.org/1508031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44318 0039d316-1c4b-4281-b951-d872f2087c98
* Changed horizontal scaler to start with 0 instead of 0.5.sergeyu@chromium.org2010-04-132-4/+4
| | | | | | | | | BUG=19113 TEST=Left border in WebKit/LayoutTests/media/content/test.ogv is clearly visible. Review URL: http://codereview.chromium.org/1650002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44311 0039d316-1c4b-4281-b951-d872f2087c98
* Vertical filtering conditional on fraction/scale factorfbarchard@chromium.org2010-04-132-32/+71
| | | | | | | | | BUG=19113 TEST=do large scale factors and look for lines every nth line. Should look smooth and be faster than previously. Review URL: http://codereview.chromium.org/1521023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44307 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed build problem with disabled SSE.sergeyu@chromium.org2010-04-112-2/+8
| | | | | | | | | BUG=19113 TEST=Code builds with disabled SSE. Review URL: http://codereview.chromium.org/1576032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44214 0039d316-1c4b-4281-b951-d872f2087c98
* add filtering to player_wtlfbarchard@chromium.org2010-04-095-27/+76
| | | | | | | | | BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1576030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44130 0039d316-1c4b-4281-b951-d872f2087c98
* Optimized version of bilinear video scaler. It is about 2 times faster than ↵sergeyu@chromium.org2010-04-099-470/+808
| | | | | | | | | | | Skia that is currently used for video scaling. BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1556021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44119 0039d316-1c4b-4281-b951-d872f2087c98
* Hierarchy. Hierarchy. Hierarchy!!!avi@chromium.org2010-04-091-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1561020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44107 0039d316-1c4b-4281-b951-d872f2087c98
* Flush audio data after seekhclam@chromium.org2010-04-084-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is about 400 to 600 ms of audio that needs to be flushed after seek, this have a pretty UX effect. This is partially fixed in this patch by reducing the amount of data down to about at most 500 ms stored in the hardware buffer. This patch clears data in the software buffer in the browser process when seek happens. We could reduce the amount of hardware buffer to further reduce the amount of lag but that can be fixed by subsequent patch. BUG=24150 TEST=audio still works, audio still play after seek the playback of old data after seek is substantially reduced. Few changes in this patch: 1. Flush software buffer after seek in browser process 2. Get rid of prerolling, this actually has not effect at all, so getting rid of useless code Needs to be done after this patch: 1. Further reduce the remaining data after seek and pause 2. Still hit the DCHECK in ClockImpl::Play(), this doesn't seem to be a new problem introduced in this patch Review URL: http://codereview.chromium.org/1508021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43983 0039d316-1c4b-4281-b951-d872f2087c98
* Assume pending buffered bytes is zero when ALSA has underrun.scherkus@chromium.org2010-04-085-16/+73
| | | | | | | | | | | | | According to docs, snd_pcm_delay() may not reach zero when ALSA has underrun. Furthermore it may return negative numbers when underrun, leading to an underflow when converted to uint32. Previously none of this was an issue however as of r43546 we now wait for pending buffered bytes to reach zero before notifying that the audio stream has finished. This doesn't completely fix the Linux ended event issue, but is a required fix regardless. BUG=30452 TEST=media_unittests Review URL: http://codereview.chromium.org/1618006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43914 0039d316-1c4b-4281-b951-d872f2087c98
* Remove outdated TODO.scherkus@chromium.org2010-04-071-3/+0
| | | | | | | | | | BUG=none TEST=none TBR=fbarchard Review URL: http://codereview.chromium.org/1630008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43815 0039d316-1c4b-4281-b951-d872f2087c98
* media disable threads for ogg to avoid shutdown crashfbarchard@chromium.org2010-04-072-1/+13
| | | | | | | | | BUG=40458 TEST=ffmpeg_tests still2.ogv Review URL: http://codereview.chromium.org/1539022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43800 0039d316-1c4b-4281-b951-d872f2087c98
* Don't clear VideoRendererImpl's proxy_ variable during OnStop().scherkus@chromium.org2010-04-061-3/+7
| | | | | | | | | | | | | | | | | | | | Nasty threading issue involving PipelineThread, VideoRendererThread and RenderThread: - VideoRendererThread continuously calls OnFrameAvailable(), as expected - RenderThread gets the signal to destroy a <video> - RenderThread blocks on PipelineThread to finish clean up - PipelineThread calls OnStop(), which sets proxy_ to NULL - Race condition occurs if VideoRendererThread was already on its way to call OnFrameAvailable() again Now we could fix this by adding more locks (i.e., inside VideoRendererBase::ThreadMain() before we call OnFrameAvailable()), but that defeats the entire point of keeping VideoRendererThread as lock-free as possible. We could also add an extra lock in VideoRendererImpl to synchronize access to proxy_, but that's unnecessary as proxy_ outlives VideoRendererImpl so there's no need to set it to NULL. Furthermore it's OK to keep calling proxy_->Repaint() since that will post tasks to the RenderThread, which is conveniently blocked on PipelineThread to finish, who is blocked on VideoRendererThread to finish calling proxy_->Repaint()! After that task is posted, everything unblocks and terminates and when RenderThread resumes it notifies proxy_ to cancel any pending tasks (such as that last repaint). BUG=35858 TEST=layout tests should crash less frequently on shutdown Review URL: http://codereview.chromium.org/1625003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43766 0039d316-1c4b-4281-b951-d872f2087c98
* Audio cut off ~500ms too earlyhclam@chromium.org2010-04-021-2/+4
| | | | | | | | | | | | | | | | BUG=23055 TEST=layout tests and audio won't cut off too early with this file: http://commons.wikimedia.org/wiki/File:Montreal2.ogg This patch fix the problem by adding an extra condition to determine the end of playback by using the information of buffered audio data in the browser process. If both the renderer process and browser process don't have any more audio data then end of playback is resulted. Review URL: http://codereview.chromium.org/1581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43546 0039d316-1c4b-4281-b951-d872f2087c98