| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |