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 19 matching lines...) Expand all Loading... |
30 #include "media/base/media_switches.h" | 30 #include "media/base/media_switches.h" |
31 #include "media/base/pipeline.h" | 31 #include "media/base/pipeline.h" |
32 #include "media/base/timestamp_constants.h" | 32 #include "media/base/timestamp_constants.h" |
33 #include "media/base/video_util.h" | 33 #include "media/base/video_util.h" |
34 | 34 |
35 // Include libvpx header files. | 35 // Include libvpx header files. |
36 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide | 36 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide |
37 // backwards compatibility for legacy applications using the library. | 37 // backwards compatibility for legacy applications using the library. |
38 #define VPX_CODEC_DISABLE_COMPAT 1 | 38 #define VPX_CODEC_DISABLE_COMPAT 1 |
39 extern "C" { | 39 extern "C" { |
40 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" | 40 #include "third_party/libvpx_new/source/libvpx/vpx/vp8dx.h" |
41 #include "third_party/libvpx/source/libvpx/vpx/vpx_frame_buffer.h" | 41 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_decoder.h" |
42 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" | 42 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_frame_buffer.h" |
43 } | 43 } |
44 | 44 |
45 namespace media { | 45 namespace media { |
46 | 46 |
47 // Always try to use three threads for video decoding. There is little reason | 47 // Always try to use three threads for video decoding. There is little reason |
48 // not to since current day CPUs tend to be multi-core and we measured | 48 // not to since current day CPUs tend to be multi-core and we measured |
49 // performance benefits on older machines such as P4s with hyperthreading. | 49 // performance benefits on older machines such as P4s with hyperthreading. |
50 static const int kDecodeThreads = 2; | 50 static const int kDecodeThreads = 2; |
51 static const int kMaxDecodeThreads = 16; | 51 static const int kMaxDecodeThreads = 16; |
52 | 52 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); | 613 vpx_image->stride[VPX_PLANE_Y], vpx_image->d_h, video_frame->get()); |
614 return; | 614 return; |
615 } | 615 } |
616 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], | 616 CopyAPlane(vpx_image_alpha->planes[VPX_PLANE_Y], |
617 vpx_image_alpha->stride[VPX_PLANE_Y], | 617 vpx_image_alpha->stride[VPX_PLANE_Y], |
618 vpx_image_alpha->d_h, | 618 vpx_image_alpha->d_h, |
619 video_frame->get()); | 619 video_frame->get()); |
620 } | 620 } |
621 | 621 |
622 } // namespace media | 622 } // namespace media |
OLD | NEW |