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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, | 541 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, |
542 color_space); | 542 color_space); |
543 return; | 543 return; |
544 } | 544 } |
545 | 545 |
546 *video_frame = frame_pool_.CreateFrame( | 546 *video_frame = frame_pool_.CreateFrame( |
547 codec_format, | 547 codec_format, |
548 visible_size, | 548 visible_size, |
549 gfx::Rect(visible_size), | 549 gfx::Rect(visible_size), |
550 config_.natural_size(), | 550 config_.natural_size(), |
551 kNoTimestamp()); | 551 kNoTimestamp(), |
| 552 false); |
552 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, | 553 video_frame->get()->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, |
553 color_space); | 554 color_space); |
554 | 555 |
555 CopyYPlane(vpx_image->planes[VPX_PLANE_Y], | 556 CopyYPlane(vpx_image->planes[VPX_PLANE_Y], |
556 vpx_image->stride[VPX_PLANE_Y], | 557 vpx_image->stride[VPX_PLANE_Y], |
557 vpx_image->d_h, | 558 vpx_image->d_h, |
558 video_frame->get()); | 559 video_frame->get()); |
559 CopyUPlane(vpx_image->planes[VPX_PLANE_U], | 560 CopyUPlane(vpx_image->planes[VPX_PLANE_U], |
560 vpx_image->stride[VPX_PLANE_U], | 561 vpx_image->stride[VPX_PLANE_U], |
561 uv_rows, | 562 uv_rows, |
562 video_frame->get()); | 563 video_frame->get()); |
563 CopyVPlane(vpx_image->planes[VPX_PLANE_V], | 564 CopyVPlane(vpx_image->planes[VPX_PLANE_V], |
564 vpx_image->stride[VPX_PLANE_V], | 565 vpx_image->stride[VPX_PLANE_V], |
565 uv_rows, | 566 uv_rows, |
566 video_frame->get()); | 567 video_frame->get()); |
567 if (!vpx_codec_alpha_) | 568 if (!vpx_codec_alpha_) |
568 return; | 569 return; |
569 if (!vpx_image_alpha) { | 570 if (!vpx_image_alpha) { |
570 MakeOpaqueAPlane( | 571 MakeOpaqueAPlane( |
571 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); | 572 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); |
572 return; | 573 return; |
573 } | 574 } |
574 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], | 575 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], |
575 vpx_image_alpha->stride[VPX_PLANE_Y], | 576 vpx_image_alpha->stride[VPX_PLANE_Y], |
576 vpx_image_alpha->d_h, | 577 vpx_image_alpha->d_h, |
577 video_frame->get()); | 578 video_frame->get()); |
578 } | 579 } |
579 | 580 |
580 } // namespace media | 581 } // namespace media |
OLD | NEW |