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

Side by Side Diff: media/base/video_frame.h

Issue 430583005: Make VEA test support videos with different coded size and visible size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments of patch set 15 Created 6 years, 3 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
OLDNEW
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 #ifndef MEDIA_BASE_VIDEO_FRAME_H_ 5 #ifndef MEDIA_BASE_VIDEO_FRAME_H_
6 #define MEDIA_BASE_VIDEO_FRAME_H_ 6 #define MEDIA_BASE_VIDEO_FRAME_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // given coded size and format. 233 // given coded size and format.
234 static size_t PlaneAllocationSize(Format format, 234 static size_t PlaneAllocationSize(Format format,
235 size_t plane, 235 size_t plane,
236 const gfx::Size& coded_size); 236 const gfx::Size& coded_size);
237 237
238 // Returns horizontal bits per pixel for given |plane| and |format|. 238 // Returns horizontal bits per pixel for given |plane| and |format|.
239 static int PlaneHorizontalBitsPerPixel(Format format, size_t plane); 239 static int PlaneHorizontalBitsPerPixel(Format format, size_t plane);
240 240
241 // Returns the number of bytes per row for the given plane, format, and width. 241 // Returns the number of bytes per row for the given plane, format, and width.
242 // The width may be aligned to format requirements. 242 // The width may be aligned to format requirements.
243 static int RowBytes(size_t plane, Format format, int width); 243 static size_t RowBytes(size_t plane, Format format, int width);
244
245 // Returns the number of rows for the given plane, format, and height.
246 // The height may be aligned to format requirements.
247 static size_t Rows(size_t plane, Format format, int height);
244 248
245 Format format() const { return format_; } 249 Format format() const { return format_; }
246 250
247 const gfx::Size& coded_size() const { return coded_size_; } 251 const gfx::Size& coded_size() const { return coded_size_; }
248 const gfx::Rect& visible_rect() const { return visible_rect_; } 252 const gfx::Rect& visible_rect() const { return visible_rect_; }
249 const gfx::Size& natural_size() const { return natural_size_; } 253 const gfx::Size& natural_size() const { return natural_size_; }
250 254
251 int stride(size_t plane) const; 255 int stride(size_t plane) const;
252 256
253 // Returns the number of bytes per row and number of rows for a given plane. 257 // Returns the number of bytes per row and number of rows for a given plane.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 uint32 release_sync_point_; 387 uint32 release_sync_point_;
384 388
385 const bool end_of_stream_; 389 const bool end_of_stream_;
386 390
387 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); 391 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame);
388 }; 392 };
389 393
390 } // namespace media 394 } // namespace media
391 395
392 #endif // MEDIA_BASE_VIDEO_FRAME_H_ 396 #endif // MEDIA_BASE_VIDEO_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698