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

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

Issue 6262002: Chromium build failed with heap leak checker, or configured with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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 | 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 353
354 VideoFrame::Format FFmpegVideoDecodeEngine::GetSurfaceFormat() const { 354 VideoFrame::Format FFmpegVideoDecodeEngine::GetSurfaceFormat() const {
355 // J (Motion JPEG) versions of YUV are full range 0..255. 355 // J (Motion JPEG) versions of YUV are full range 0..255.
356 // Regular (MPEG) YUV is 16..240. 356 // Regular (MPEG) YUV is 16..240.
357 // For now we will ignore the distinction and treat them the same. 357 // For now we will ignore the distinction and treat them the same.
358 switch (codec_context_->pix_fmt) { 358 switch (codec_context_->pix_fmt) {
359 case PIX_FMT_YUV420P: 359 case PIX_FMT_YUV420P:
360 case PIX_FMT_YUVJ420P: 360 case PIX_FMT_YUVJ420P:
361 return VideoFrame::YV12; 361 return VideoFrame::YV12;
362 break;
363 case PIX_FMT_YUV422P: 362 case PIX_FMT_YUV422P:
364 case PIX_FMT_YUVJ422P: 363 case PIX_FMT_YUVJ422P:
365 return VideoFrame::YV16; 364 return VideoFrame::YV16;
366 break;
367 default: 365 default:
368 // TODO(scherkus): More formats here? 366 // TODO(scherkus): More formats here?
369 return VideoFrame::INVALID; 367 break;
370 } 368 }
369 return VideoFrame::INVALID;
371 } 370 }
372 371
373 } // namespace media 372 } // namespace media
374 373
375 // Disable refcounting for this object because this object only lives 374 // Disable refcounting for this object because this object only lives
376 // on the video decoder thread and there's no need to refcount it. 375 // on the video decoder thread and there's no need to refcount it.
377 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::FFmpegVideoDecodeEngine); 376 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