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/filters/vpx_video_decoder.h" | 5 #include "media/filters/vpx_video_decoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, | 496 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, |
497 color_space); | 497 color_space); |
498 return; | 498 return; |
499 } | 499 } |
500 | 500 |
501 *video_frame = frame_pool_.CreateFrame( | 501 *video_frame = frame_pool_.CreateFrame( |
502 codec_format, | 502 codec_format, |
503 visible_size, | 503 visible_size, |
504 gfx::Rect(visible_size), | 504 gfx::Rect(visible_size), |
505 config_.natural_size(), | 505 config_.natural_size(), |
506 kNoTimestamp()); | 506 kNoTimestamp(), |
| 507 false); |
507 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, | 508 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, |
508 color_space); | 509 color_space); |
509 | 510 |
510 CopyYPlane(vpx_image->planes[VPX_PLANE_Y], | 511 CopyYPlane(vpx_image->planes[VPX_PLANE_Y], |
511 vpx_image->stride[VPX_PLANE_Y], | 512 vpx_image->stride[VPX_PLANE_Y], |
512 vpx_image->d_h, | 513 vpx_image->d_h, |
513 video_frame->get()); | 514 video_frame->get()); |
514 CopyUPlane(vpx_image->planes[VPX_PLANE_U], | 515 CopyUPlane(vpx_image->planes[VPX_PLANE_U], |
515 vpx_image->stride[VPX_PLANE_U], | 516 vpx_image->stride[VPX_PLANE_U], |
516 uv_rows, | 517 uv_rows, |
517 video_frame->get()); | 518 video_frame->get()); |
518 CopyVPlane(vpx_image->planes[VPX_PLANE_V], | 519 CopyVPlane(vpx_image->planes[VPX_PLANE_V], |
519 vpx_image->stride[VPX_PLANE_V], | 520 vpx_image->stride[VPX_PLANE_V], |
520 uv_rows, | 521 uv_rows, |
521 video_frame->get()); | 522 video_frame->get()); |
522 if (!vpx_codec_alpha_) | 523 if (!vpx_codec_alpha_) |
523 return; | 524 return; |
524 if (!vpx_image_alpha) { | 525 if (!vpx_image_alpha) { |
525 MakeOpaqueAPlane( | 526 MakeOpaqueAPlane( |
526 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); | 527 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); |
527 return; | 528 return; |
528 } | 529 } |
529 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], | 530 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], |
530 vpx_image_alpha->stride[VPX_PLANE_Y], | 531 vpx_image_alpha->stride[VPX_PLANE_Y], |
531 vpx_image_alpha->d_h, | 532 vpx_image_alpha->d_h, |
532 video_frame->get()); | 533 video_frame->get()); |
533 } | 534 } |
534 | 535 |
535 } // namespace media | 536 } // namespace media |
OLD | NEW |