summaryrefslogtreecommitdiffstats
path: root/media/base/video_frame.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 15:10:42 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-07 15:10:42 +0000
commitbe2003515724ca3df351d414eb3ba85e9450afb5 (patch)
tree048e15ee89e47ad9278e0ad8a42d6e408496fad0 /media/base/video_frame.h
parent18e9d8cab7ee5c40d69e5f8b5943472fc6432f72 (diff)
downloadchromium_src-be2003515724ca3df351d414eb3ba85e9450afb5.zip
chromium_src-be2003515724ca3df351d414eb3ba85e9450afb5.tar.gz
chromium_src-be2003515724ca3df351d414eb3ba85e9450afb5.tar.bz2
Faster RGBA->YV12 conversion using hbono's algorithm
Thank you so much to hbono for working on a much faster RGB32 to YV12 conversion routine. Since his version is mainly for SSSE3 I updated the SSE2 version using his algorithm so that older processors can benefits too. There are a couple things different than hbono's version: 1. 2x2 Subsampling for U and V. In order to compute this subsampling faster, 2x2 RGB values are subsampled first before doing the conversion for UV. Mathematically this should generate the same results as subsampling U and V after conversion. 2. Perform conversion for U and V on two pixels. hbono's original version perform a multiply add on U and V at the same time. This algorithm changes it so that multiply add is performed on two Us and two Vs in separate steps. This generate two subsampled Us and Vs. 3. Omit the addition of 0.5. Instead of apply the rounding at each stage of calculation the rounding is performed in the precomputed table. I tested that the 0.5 rounding doesn't have a significant effect. 4. Use movdqu instead of movdqa on source pixels. Incoming RGB buffer doesn't gurantee alignment so movdqu is used. To further enhance the speed we can do a precomputation before each loop so that we can select a version using movqdu or movdqa. This color space conversion process is about 2 times faster than the existing version. BUG=None TEST=Unit test and visual inspection. Review URL: http://codereview.chromium.org/7791024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_frame.h')
0 files changed, 0 insertions, 0 deletions