Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Side by Side Diff: media/base/decoder_buffer.cc

Issue 1133363002: Getting rid of duplicate includes from media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/data_buffer.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/decoder_buffer.h" 5 #include "media/base/decoder_buffer.h"
6 6
7 #include "base/logging.h"
8 #include "media/base/buffers.h"
9 #include "media/base/decrypt_config.h"
10 7
11 namespace media { 8 namespace media {
12 9
13 // Allocates a block of memory which is padded for use with the SIMD 10 // Allocates a block of memory which is padded for use with the SIMD
14 // optimizations used by FFmpeg. 11 // optimizations used by FFmpeg.
15 static uint8* AllocateFFmpegSafeBlock(int size) { 12 static uint8* AllocateFFmpegSafeBlock(int size) {
16 uint8* const block = reinterpret_cast<uint8*>(base::AlignedAlloc( 13 uint8* const block = reinterpret_cast<uint8*>(base::AlignedAlloc(
17 size + DecoderBuffer::kPaddingSize, DecoderBuffer::kAlignmentSize)); 14 size + DecoderBuffer::kPaddingSize, DecoderBuffer::kAlignmentSize));
18 memset(block + size, 0, DecoderBuffer::kPaddingSize); 15 memset(block + size, 0, DecoderBuffer::kPaddingSize);
19 return block; 16 return block;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 side_data_size_ = side_data_size; 113 side_data_size_ = side_data_size;
117 side_data_.reset(AllocateFFmpegSafeBlock(side_data_size_)); 114 side_data_.reset(AllocateFFmpegSafeBlock(side_data_size_));
118 memcpy(side_data_.get(), side_data, side_data_size_); 115 memcpy(side_data_.get(), side_data, side_data_size_);
119 } else { 116 } else {
120 side_data_.reset(); 117 side_data_.reset();
121 side_data_size_ = 0; 118 side_data_size_ = 0;
122 } 119 }
123 } 120 }
124 121
125 } // namespace media 122 } // namespace media
OLDNEW
« no previous file with comments | « media/base/data_buffer.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698