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

Side by Side Diff: media/video/ffmpeg_video_decode_engine.cc

Issue 5991005: Chromium build failed with heap leak checker, or configured with 'gyp_chromiu... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/video/ffmpeg_video_decode_engine.h" 5 #include "media/video/ffmpeg_video_decode_engine.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "media/base/buffers.h" 10 #include "media/base/buffers.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 346 }
347 347
348 VideoFrame::Format FFmpegVideoDecodeEngine::GetSurfaceFormat() const { 348 VideoFrame::Format FFmpegVideoDecodeEngine::GetSurfaceFormat() const {
349 // J (Motion JPEG) versions of YUV are full range 0..255. 349 // J (Motion JPEG) versions of YUV are full range 0..255.
350 // Regular (MPEG) YUV is 16..240. 350 // Regular (MPEG) YUV is 16..240.
351 // For now we will ignore the distinction and treat them the same. 351 // For now we will ignore the distinction and treat them the same.
352 switch (codec_context_->pix_fmt) { 352 switch (codec_context_->pix_fmt) {
353 case PIX_FMT_YUV420P: 353 case PIX_FMT_YUV420P:
354 case PIX_FMT_YUVJ420P: 354 case PIX_FMT_YUVJ420P:
355 return VideoFrame::YV12; 355 return VideoFrame::YV12;
356 break;
357 case PIX_FMT_YUV422P: 356 case PIX_FMT_YUV422P:
358 case PIX_FMT_YUVJ422P: 357 case PIX_FMT_YUVJ422P:
359 return VideoFrame::YV16; 358 return VideoFrame::YV16;
360 break;
361 default: 359 default:
362 // TODO(scherkus): More formats here? 360 // TODO(scherkus): More formats here?
363 return VideoFrame::INVALID; 361 break;
364 } 362 }
363 return VideoFrame::INVALID;
365 } 364 }
366 365
367 } // namespace media 366 } // namespace media
368 367
369 // Disable refcounting for this object because this object only lives 368 // Disable refcounting for this object because this object only lives
370 // on the video decoder thread and there's no need to refcount it. 369 // on the video decoder thread and there's no need to refcount it.
371 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::FFmpegVideoDecodeEngine); 370 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::FFmpegVideoDecodeEngine);
OLDNEW
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698