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

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

Issue 92703003: Support videos with JPEG color range in GPU YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuv_v2
Patch Set: Add missing 'f' to float literal to make VS happy Created 6 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 | « content/common/cc_messages_unittest.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) 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/video_frame.h" 5 #include "media/base/video_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 int height = coded_size_.height(); 553 int height = coded_size_.height();
554 switch (format_) { 554 switch (format_) {
555 case YV16: 555 case YV16:
556 return height; 556 return height;
557 557
558 case YV12A: 558 case YV12A:
559 if (plane == kAPlane) 559 if (plane == kAPlane)
560 return height; 560 return height;
561 // Fallthrough. 561 // Fallthrough.
562 case YV12: 562 case YV12:
563 case YV12J:
563 case I420: 564 case I420:
564 if (plane == kYPlane) 565 if (plane == kYPlane)
565 return height; 566 return height;
566 return RoundUp(height, 2) / 2; 567 return RoundUp(height, 2) / 2;
567 568
568 default: 569 default:
569 break; 570 break;
570 } 571 }
571 572
572 // Intentionally leave out non-production formats. 573 // Intentionally leave out non-production formats.
(...skipping 29 matching lines...) Expand all
602 break; 603 break;
603 for (int row = 0; row < rows(plane); ++row) { 604 for (int row = 0; row < rows(plane); ++row) {
604 base::MD5Update(context, base::StringPiece( 605 base::MD5Update(context, base::StringPiece(
605 reinterpret_cast<char*>(data(plane) + stride(plane) * row), 606 reinterpret_cast<char*>(data(plane) + stride(plane) * row),
606 row_bytes(plane))); 607 row_bytes(plane)));
607 } 608 }
608 } 609 }
609 } 610 }
610 611
611 } // namespace media 612 } // namespace media
OLDNEW
« no previous file with comments | « content/common/cc_messages_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698