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

Side by Side Diff: media/renderers/skcanvas_video_renderer.cc

Issue 2113243003: media: Introduce Y8 and Y16 video pixel format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to land 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
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 #include "media/renderers/skcanvas_video_renderer.h" 5 #include "media/renderers/skcanvas_video_renderer.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "gpu/GLES2/gl2extchromium.h" 10 #include "gpu/GLES2/gl2extchromium.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 case PIXEL_FORMAT_NV12: 635 case PIXEL_FORMAT_NV12:
636 case PIXEL_FORMAT_NV21: 636 case PIXEL_FORMAT_NV21:
637 case PIXEL_FORMAT_UYVY: 637 case PIXEL_FORMAT_UYVY:
638 case PIXEL_FORMAT_YUY2: 638 case PIXEL_FORMAT_YUY2:
639 case PIXEL_FORMAT_ARGB: 639 case PIXEL_FORMAT_ARGB:
640 case PIXEL_FORMAT_XRGB: 640 case PIXEL_FORMAT_XRGB:
641 case PIXEL_FORMAT_RGB24: 641 case PIXEL_FORMAT_RGB24:
642 case PIXEL_FORMAT_RGB32: 642 case PIXEL_FORMAT_RGB32:
643 case PIXEL_FORMAT_MJPEG: 643 case PIXEL_FORMAT_MJPEG:
644 case PIXEL_FORMAT_MT21: 644 case PIXEL_FORMAT_MT21:
645 // TODO(dshwang): Use either I400ToARGB or J400ToARGB depending if we want
646 // BT.601 constrained range of 16 to 240, or JPEG full range BT.601
647 // coefficients. Implement it when Y8/16 foramt is supported.
648 // crbug.com/624436
649 case PIXEL_FORMAT_Y8:
650 case PIXEL_FORMAT_Y16:
645 case PIXEL_FORMAT_UNKNOWN: 651 case PIXEL_FORMAT_UNKNOWN:
646 NOTREACHED(); 652 NOTREACHED();
647 } 653 }
648 } 654 }
649 655
650 // static 656 // static
651 void SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture( 657 void SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture(
652 gpu::gles2::GLES2Interface* gl, 658 gpu::gles2::GLES2Interface* gl,
653 VideoFrame* video_frame, 659 VideoFrame* video_frame,
654 unsigned int texture, 660 unsigned int texture,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 if (!last_image_) // Couldn't create the SkImage. 792 if (!last_image_) // Couldn't create the SkImage.
787 return false; 793 return false;
788 last_timestamp_ = video_frame->timestamp(); 794 last_timestamp_ = video_frame->timestamp();
789 } 795 }
790 last_image_deleting_timer_.Reset(); 796 last_image_deleting_timer_.Reset();
791 DCHECK(!!last_image_); 797 DCHECK(!!last_image_);
792 return true; 798 return true;
793 } 799 }
794 800
795 } // namespace media 801 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698