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

Side by Side Diff: media/filters/vpx_video_decoder.cc

Issue 2370453003: 12-bit vp9 video support (Closed)
Patch Set: 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/filters/vpx_video_decoder.h" 5 #include "media/filters/vpx_video_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 break; 726 break;
727 727
728 case VPX_IMG_FMT_I42016: 728 case VPX_IMG_FMT_I42016:
729 switch (vpx_image->bit_depth) { 729 switch (vpx_image->bit_depth) {
730 case 9: 730 case 9:
731 codec_format = PIXEL_FORMAT_YUV420P9; 731 codec_format = PIXEL_FORMAT_YUV420P9;
732 break; 732 break;
733 case 10: 733 case 10:
734 codec_format = PIXEL_FORMAT_YUV420P10; 734 codec_format = PIXEL_FORMAT_YUV420P10;
735 break; 735 break;
736 case 12:
737 codec_format = PIXEL_FORMAT_YUV420P12;
738 break;
736 default: 739 default:
737 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth; 740 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth;
738 return false; 741 return false;
739 } 742 }
740 break; 743 break;
741 744
742 case VPX_IMG_FMT_I42216: 745 case VPX_IMG_FMT_I42216:
743 switch (vpx_image->bit_depth) { 746 switch (vpx_image->bit_depth) {
744 case 9: 747 case 9:
745 codec_format = PIXEL_FORMAT_YUV422P9; 748 codec_format = PIXEL_FORMAT_YUV422P9;
746 break; 749 break;
747 case 10: 750 case 10:
748 codec_format = PIXEL_FORMAT_YUV422P10; 751 codec_format = PIXEL_FORMAT_YUV422P10;
749 break; 752 break;
753 case 12:
754 codec_format = PIXEL_FORMAT_YUV422P12;
755 break;
750 default: 756 default:
751 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth; 757 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth;
752 return false; 758 return false;
753 } 759 }
754 break; 760 break;
755 761
756 case VPX_IMG_FMT_I44416: 762 case VPX_IMG_FMT_I44416:
757 switch (vpx_image->bit_depth) { 763 switch (vpx_image->bit_depth) {
758 case 9: 764 case 9:
759 codec_format = PIXEL_FORMAT_YUV444P9; 765 codec_format = PIXEL_FORMAT_YUV444P9;
760 break; 766 break;
761 case 10: 767 case 10:
762 codec_format = PIXEL_FORMAT_YUV444P10; 768 codec_format = PIXEL_FORMAT_YUV444P10;
763 break; 769 break;
770 case 12:
771 codec_format = PIXEL_FORMAT_YUV444P12;
772 break;
764 default: 773 default:
765 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth; 774 DLOG(ERROR) << "Unsupported bit depth: " << vpx_image->bit_depth;
766 return false; 775 return false;
767 } 776 }
768 break; 777 break;
769 778
770 default: 779 default:
771 DLOG(ERROR) << "Unsupported pixel format: " << vpx_image->fmt; 780 DLOG(ERROR) << "Unsupported pixel format: " << vpx_image->fmt;
772 return false; 781 return false;
773 } 782 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 (*video_frame)->visible_data(VideoFrame::kUPlane), 835 (*video_frame)->visible_data(VideoFrame::kUPlane),
827 (*video_frame)->stride(VideoFrame::kUPlane), 836 (*video_frame)->stride(VideoFrame::kUPlane),
828 (*video_frame)->visible_data(VideoFrame::kVPlane), 837 (*video_frame)->visible_data(VideoFrame::kVPlane),
829 (*video_frame)->stride(VideoFrame::kVPlane), coded_size.width(), 838 (*video_frame)->stride(VideoFrame::kVPlane), coded_size.width(),
830 coded_size.height()); 839 coded_size.height());
831 840
832 return true; 841 return true;
833 } 842 }
834 843
835 } // namespace media 844 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698