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

Side by Side Diff: webrtc/common_video/video_frame.cc

Issue 1306813009: H.264 video codec support using OpenH264/FFmpeg (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: (Alphabetical sorting in common_video.gyp deps) Created 4 years, 11 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 | « webrtc/common_video/common_video.gyp ('k') | webrtc/modules/modules.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/video_frame.h" 11 #include "webrtc/video_frame.h"
12 12
13 #include <string.h> 13 #include <string.h>
14 14
15 #include <algorithm> // swap 15 #include <algorithm> // swap
16 16
17 #include "webrtc/base/bind.h" 17 #include "webrtc/base/bind.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 // TODO(hbos): The FFmpeg video decoder will require up to 8 bytes, update this 22 // FFmpeg's decoder, used by H264DecoderImpl, requires up to 8 bytes padding due
23 // when the FFmpeg decoder is added. 23 // to optimized bitstream readers. See avcodec_decode_video2.
24 const size_t EncodedImage::kBufferPaddingBytesH264 = 0; 24 const size_t EncodedImage::kBufferPaddingBytesH264 = 8;
25 25
26 bool EqualPlane(const uint8_t* data1, 26 bool EqualPlane(const uint8_t* data1,
27 const uint8_t* data2, 27 const uint8_t* data2,
28 int stride, 28 int stride,
29 int width, 29 int width,
30 int height) { 30 int height) {
31 for (int y = 0; y < height; ++y) { 31 for (int y = 0; y < height; ++y) {
32 if (memcmp(data1, data2, width) != 0) 32 if (memcmp(data1, data2, width) != 0)
33 return false; 33 return false;
34 data1 += stride; 34 data1 += stride;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 case kVideoCodecULPFEC: 258 case kVideoCodecULPFEC:
259 case kVideoCodecGeneric: 259 case kVideoCodecGeneric:
260 case kVideoCodecUnknown: 260 case kVideoCodecUnknown:
261 return 0; 261 return 0;
262 } 262 }
263 RTC_NOTREACHED(); 263 RTC_NOTREACHED();
264 return 0; 264 return 0;
265 } 265 }
266 266
267 } // namespace webrtc 267 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_video/common_video.gyp ('k') | webrtc/modules/modules.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698