Lines Matching defs:VideoFrame

31 static gfx::Size AdjustCodedSize(VideoFrame::Format format,
35 case VideoFrame::YV12:
36 case VideoFrame::YV12A:
37 case VideoFrame::I420:
38 case VideoFrame::YV12J:
41 case VideoFrame::YV16:
51 scoped_refptr<VideoFrame> VideoFrame::CreateFrame(
52 VideoFrame::Format format,
57 DCHECK(format != VideoFrame::UNKNOWN &&
58 format != VideoFrame::NV12 &&
59 format != VideoFrame::NATIVE_TEXTURE);
61 DCHECK(format != VideoFrame::HOLE);
70 scoped_refptr<VideoFrame> frame(
71 new VideoFrame(format,
83 std::string VideoFrame::FormatToString(VideoFrame::Format format) {
85 case VideoFrame::UNKNOWN:
87 case VideoFrame::YV12:
89 case VideoFrame::YV16:
91 case VideoFrame::I420:
93 case VideoFrame::NATIVE_TEXTURE:
96 case VideoFrame::HOLE:
99 case VideoFrame::YV12A:
101 case VideoFrame::YV12J:
103 case VideoFrame::NV12:
105 case VideoFrame::YV24:
113 bool VideoFrame::IsValidConfig(VideoFrame::Format format,
131 case VideoFrame::UNKNOWN:
134 case VideoFrame::YV24:
136 case VideoFrame::YV12:
137 case VideoFrame::YV12J:
138 case VideoFrame::I420:
139 case VideoFrame::YV12A:
140 case VideoFrame::NV12:
146 case VideoFrame::YV16:
151 case VideoFrame::NATIVE_TEXTURE:
153 case VideoFrame::HOLE:
166 scoped_refptr<VideoFrame> VideoFrame::WrapNativeTexture(
174 scoped_refptr<VideoFrame> frame(new VideoFrame(NATIVE_TEXTURE,
188 void VideoFrame::ReadPixelsFromNativeTexture(const SkBitmap& pixels) {
196 scoped_refptr<VideoFrame> VideoFrame::WrapExternalPackedMemory(
214 case VideoFrame::I420: {
215 scoped_refptr<VideoFrame> frame(
216 new VideoFrame(format,
241 scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
257 scoped_refptr<VideoFrame> frame(
258 new VideoFrame(format,
288 scoped_refptr<VideoFrame> VideoFrame::WrapCVPixelBuffer(
317 scoped_refptr<VideoFrame> frame(
318 new VideoFrame(format,
332 scoped_refptr<VideoFrame> VideoFrame::WrapExternalYuvData(
348 scoped_refptr<VideoFrame> frame(
349 new VideoFrame(format,
367 scoped_refptr<VideoFrame> VideoFrame::WrapVideoFrame(
368 const scoped_refptr<VideoFrame>& frame,
377 scoped_refptr<VideoFrame> wrapped_frame(
378 new VideoFrame(frame->format(),
396 scoped_refptr<VideoFrame> VideoFrame::CreateEOSFrame() {
397 return new VideoFrame(VideoFrame::UNKNOWN,
407 scoped_refptr<VideoFrame> VideoFrame::CreateColorFrame(
411 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
412 VideoFrame::YV12, size, gfx::Rect(size), size, timestamp);
418 scoped_refptr<VideoFrame> VideoFrame::CreateBlackFrame(const gfx::Size& size) {
426 scoped_refptr<VideoFrame> VideoFrame::CreateTransparentFrame(
432 scoped_refptr<VideoFrame> frame = VideoFrame::CreateFrame(
433 VideoFrame::YV12A, size, gfx::Rect(size), size, kZero);
447 scoped_refptr<VideoFrame> VideoFrame::CreateHoleFrame(
449 DCHECK(IsValidConfig(VideoFrame::HOLE, size, gfx::Rect(size), size));
450 scoped_refptr<VideoFrame> frame(
451 new VideoFrame(VideoFrame::HOLE,
463 size_t VideoFrame::NumPlanes(Format format) {
465 case VideoFrame::NATIVE_TEXTURE:
467 case VideoFrame::HOLE:
470 case VideoFrame::NV12:
472 case VideoFrame::YV12:
473 case VideoFrame::YV16:
474 case VideoFrame::I420:
475 case VideoFrame::YV12J:
476 case VideoFrame::YV24:
478 case VideoFrame::YV12A:
480 case VideoFrame::UNKNOWN:
489 size_t VideoFrame::AllocationSize(Format format, const gfx::Size& coded_size) {
497 gfx::Size VideoFrame::PlaneSize(Format format,
506 case VideoFrame::YV24:
508 case VideoFrame::kYPlane:
509 case VideoFrame::kUPlane:
510 case VideoFrame::kVPlane:
516 case VideoFrame::YV12:
517 case VideoFrame::YV12J:
518 case VideoFrame::I420:
520 case VideoFrame::kYPlane:
522 case VideoFrame::kUPlane:
523 case VideoFrame::kVPlane:
529 case VideoFrame::YV12A:
531 case VideoFrame::kYPlane:
532 case VideoFrame::kAPlane:
534 case VideoFrame::kUPlane:
535 case VideoFrame::kVPlane:
541 case VideoFrame::YV16:
543 case VideoFrame::kYPlane:
545 case VideoFrame::kUPlane:
546 case VideoFrame::kVPlane:
552 case VideoFrame::NV12:
554 case VideoFrame::kYPlane:
556 case VideoFrame::kUVPlane:
562 case VideoFrame::UNKNOWN:
563 case VideoFrame::NATIVE_TEXTURE:
565 case VideoFrame::HOLE:
574 size_t VideoFrame::PlaneAllocationSize(Format format,
577 // VideoFrame formats are (so far) all YUV and 1 byte per sample.
582 int VideoFrame::PlaneHorizontalBitsPerPixel(Format format, size_t plane) {
584 case VideoFrame::YV24:
594 case VideoFrame::YV12:
595 case VideoFrame::YV16:
596 case VideoFrame::I420:
597 case VideoFrame::YV12J:
608 case VideoFrame::YV12A:
620 case VideoFrame::NV12:
630 case VideoFrame::UNKNOWN:
632 case VideoFrame::HOLE:
634 case VideoFrame::NATIVE_TEXTURE:
648 void VideoFrame::AllocateYUV() {
649 DCHECK(format_ == VideoFrame::YV12 || format_ == VideoFrame::YV16 ||
650 format_ == VideoFrame::YV12A || format_ == VideoFrame::I420 ||
651 format_ == VideoFrame::YV12J || format_ == VideoFrame::YV24);
662 size_t y_stride = RoundUp(row_bytes(VideoFrame::kYPlane),
664 size_t uv_stride = RoundUp(row_bytes(VideoFrame::kUPlane),
672 (format_ == VideoFrame::YV12 || format_ == VideoFrame::YV12A ||
673 format_ == VideoFrame::I420)
678 size_t a_bytes = format_ == VideoFrame::YV12A ? y_bytes : 0;
692 COMPILE_ASSERT(0 == VideoFrame::kYPlane, y_plane_data_must_be_index_0);
693 data_[VideoFrame::kYPlane] = data;
694 data_[VideoFrame::kUPlane] = data + y_bytes;
695 data_[VideoFrame::kVPlane] = data + y_bytes + uv_bytes;
696 strides_[VideoFrame::kYPlane] = y_stride;
697 strides_[VideoFrame::kUPlane] = uv_stride;
698 strides_[VideoFrame::kVPlane] = uv_stride;
700 data_[VideoFrame::kAPlane] = data + y_bytes + (2 * uv_bytes);
701 strides_[VideoFrame::kAPlane] = y_stride;
705 VideoFrame::VideoFrame(VideoFrame::Format format,
727 VideoFrame::~VideoFrame() {
743 bool VideoFrame::IsValidPlane(size_t plane, VideoFrame::Format format) {
747 int VideoFrame::stride(size_t plane) const {
753 size_t VideoFrame::RowBytes(size_t plane, VideoFrame::Format format,
757 case VideoFrame::YV24:
767 case VideoFrame::YV12:
768 case VideoFrame::YV16:
769 case VideoFrame::I420:
770 case VideoFrame::YV12J:
781 case VideoFrame::YV12A:
793 case VideoFrame::NV12:
802 case VideoFrame::UNKNOWN:
804 case VideoFrame::HOLE:
806 case VideoFrame::NATIVE_TEXTURE:
814 int VideoFrame::row_bytes(size_t plane) const {
819 size_t VideoFrame::Rows(size_t plane, VideoFrame::Format format, int height) {
822 case VideoFrame::YV24:
823 case VideoFrame::YV16:
833 case VideoFrame::YV12:
834 case VideoFrame::YV12J:
835 case VideoFrame::I420:
846 case VideoFrame::YV12A:
858 case VideoFrame::NV12:
868 case VideoFrame::UNKNOWN:
870 case VideoFrame::HOLE:
872 case VideoFrame::NATIVE_TEXTURE:
880 int VideoFrame::rows(size_t plane) const {
884 uint8* VideoFrame::data(size_t plane) const {
889 const gpu::MailboxHolder* VideoFrame::mailbox_holder() const {
894 base::SharedMemoryHandle VideoFrame::shared_memory_handle() const {
898 void VideoFrame::UpdateReleaseSyncPoint(SyncPointClient* client) {
910 int VideoFrame::dmabuf_fd(size_t plane) const {
916 CVPixelBufferRef VideoFrame::cv_pixel_buffer() const {
921 void VideoFrame::HashFrameForTesting(base::MD5Context* context) {