summaryrefslogtreecommitdiffstats
path: root/media/base/video_util.cc
diff options
context:
space:
mode:
authorwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-28 22:01:04 +0000
committerwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-28 22:01:04 +0000
commit1fa37522cade3c1bbd5a523f4aafc884348f8262 (patch)
treedbb65668ba5d228c41fa5d17a887e8d323ba972e /media/base/video_util.cc
parent2226daac070dd08be5f6c60cf464dba7fa4bd94c (diff)
downloadchromium_src-1fa37522cade3c1bbd5a523f4aafc884348f8262.zip
chromium_src-1fa37522cade3c1bbd5a523f4aafc884348f8262.tar.gz
chromium_src-1fa37522cade3c1bbd5a523f4aafc884348f8262.tar.bz2
Remove one video frame copying in video capture.
On Android, the captured frame might need to be rotated. By moving the rotation code into VideoCaptureController, one video frame copying is reduced. On Nexus 4, the frame copying from intermedia buffer to shared memory takes about 0.1 ms per frame for VGA YV12. Review URL: https://codereview.chromium.org/12378007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_util.cc')
-rw-r--r--media/base/video_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/base/video_util.cc b/media/base/video_util.cc
index d7498ad..c40468f 100644
--- a/media/base/video_util.cc
+++ b/media/base/video_util.cc
@@ -86,7 +86,7 @@ void FillYUV(VideoFrame* frame, uint8 y, uint8 u, uint8 v) {
}
void RotatePlaneByPixels(
- uint8* src,
+ const uint8* src,
uint8* dest,
int width,
int height,
@@ -175,7 +175,7 @@ void RotatePlaneByPixels(
// Copy pixels.
for (int row = 0; row < num_rows; ++row) {
- uint8* src_ptr = src;
+ const uint8* src_ptr = src;
uint8* dest_ptr = dest;
for (int col = 0; col < num_cols; ++col) {
*dest_ptr = *src_ptr++;