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

Side by Side Diff: cc/resources/video_resource_updater.h

Issue 2370453003: 12-bit vp9 video support (Closed)
Patch Set: typO Created 4 years, 2 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 | « no previous file | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 5 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 6 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 class CC_EXPORT VideoResourceUpdater 73 class CC_EXPORT VideoResourceUpdater
74 : public base::SupportsWeakPtr<VideoResourceUpdater> { 74 : public base::SupportsWeakPtr<VideoResourceUpdater> {
75 public: 75 public:
76 VideoResourceUpdater(ContextProvider* context_provider, 76 VideoResourceUpdater(ContextProvider* context_provider,
77 ResourceProvider* resource_provider); 77 ResourceProvider* resource_provider);
78 ~VideoResourceUpdater(); 78 ~VideoResourceUpdater();
79 79
80 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame( 80 VideoFrameExternalResources CreateExternalResourcesFromVideoFrame(
81 scoped_refptr<media::VideoFrame> video_frame); 81 scoped_refptr<media::VideoFrame> video_frame);
82 82
83 // Convert an array of short integers into an array of half-floats.
84 // |src| is an array of integers in range 0 .. 2^{bits_per_channel} - 1
85 // |num| is number of entries in input and output array.
86 // The numbers stored in |dst| will be half floats in range 0.0..1.0
87 static void MakeHalfFloats(const uint16_t* src,
88 int bits_per_channel,
89 size_t num,
90 uint16_t* dst);
91
83 private: 92 private:
84 class PlaneResource { 93 class PlaneResource {
85 public: 94 public:
86 PlaneResource(unsigned resource_id, 95 PlaneResource(unsigned resource_id,
87 const gfx::Size& resource_size, 96 const gfx::Size& resource_size,
88 ResourceFormat resource_format, 97 ResourceFormat resource_format,
89 gpu::Mailbox mailbox); 98 gpu::Mailbox mailbox);
90 PlaneResource(const PlaneResource& other); 99 PlaneResource(const PlaneResource& other);
91 100
92 // Returns true if this resource matches the unique identifiers of another 101 // Returns true if this resource matches the unique identifiers of another
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Recycle resources so that we can reduce the number of allocations and 189 // Recycle resources so that we can reduce the number of allocations and
181 // data transfers. 190 // data transfers.
182 ResourceList all_resources_; 191 ResourceList all_resources_;
183 192
184 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater); 193 DISALLOW_COPY_AND_ASSIGN(VideoResourceUpdater);
185 }; 194 };
186 195
187 } // namespace cc 196 } // namespace cc
188 197
189 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_ 198 #endif // CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698