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

Side by Side Diff: source/libvpx/vpxdec.c

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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 | « source/libvpx/vpx/vpx_encoder.h ('k') | source/libvpx/vpxenc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 &progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile, 99 &progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile,
100 &threadsarg, &frameparallelarg, &verbosearg, &scalearg, &fb_arg, 100 &threadsarg, &frameparallelarg, &verbosearg, &scalearg, &fb_arg,
101 &md5arg, &error_concealment, &continuearg, 101 &md5arg, &error_concealment, &continuearg,
102 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH 102 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
103 &outbitdeptharg, 103 &outbitdeptharg,
104 #endif 104 #endif
105 NULL 105 NULL
106 }; 106 };
107 107
108 #if CONFIG_VP8_DECODER 108 #if CONFIG_VP8_DECODER
109 static const arg_def_t addnoise_level = ARG_DEF(NULL, "noise-level", 1, 109 static const arg_def_t addnoise_level = ARG_DEF(
110 "Enable VP8 postproc add noise") ; 110 NULL, "noise-level", 1, "Enable VP8 postproc add noise");
111 static const arg_def_t deblock = ARG_DEF(NULL, "deblock", 0, 111 static const arg_def_t deblock = ARG_DEF(
112 "Enable VP8 deblocking"); 112 NULL, "deblock", 0, "Enable VP8 deblocking");
113 static const arg_def_t demacroblock_level = ARG_DEF(NULL, "demacroblock-level", 1, 113 static const arg_def_t demacroblock_level = ARG_DEF(
114 "Enable VP8 demacroblocking, w/ level"); 114 NULL, "demacroblock-level", 1, "Enable VP8 demacroblocking, w/ level");
115 static const arg_def_t pp_debug_info = ARG_DEF(NULL, "pp-debug-info", 1, 115 static const arg_def_t pp_debug_info = ARG_DEF(
116 "Enable VP8 visible debug info"); 116 NULL, "pp-debug-info", 1, "Enable VP8 visible debug info");
117 static const arg_def_t pp_disp_ref_frame = ARG_DEF(NULL, "pp-dbg-ref-frame", 1, 117 static const arg_def_t pp_disp_ref_frame = ARG_DEF(
118 "Display only selected refere nce frame per macro block"); 118 NULL, "pp-dbg-ref-frame", 1,
119 static const arg_def_t pp_disp_mb_modes = ARG_DEF(NULL, "pp-dbg-mb-modes", 1, 119 "Display only selected reference frame per macro block");
120 "Display only selected macro b lock modes"); 120 static const arg_def_t pp_disp_mb_modes = ARG_DEF(
121 static const arg_def_t pp_disp_b_modes = ARG_DEF(NULL, "pp-dbg-b-modes", 1, 121 NULL, "pp-dbg-mb-modes", 1, "Display only selected macro block modes");
122 "Display only selected block mo des"); 122 static const arg_def_t pp_disp_b_modes = ARG_DEF(
123 static const arg_def_t pp_disp_mvs = ARG_DEF(NULL, "pp-dbg-mvs", 1, 123 NULL, "pp-dbg-b-modes", 1, "Display only selected block modes");
124 "Draw only selected motion vectors" ); 124 static const arg_def_t pp_disp_mvs = ARG_DEF(
125 static const arg_def_t mfqe = ARG_DEF(NULL, "mfqe", 0, 125 NULL, "pp-dbg-mvs", 1, "Draw only selected motion vectors");
126 "Enable multiframe quality enhancement"); 126 static const arg_def_t mfqe = ARG_DEF(
127 NULL, "mfqe", 0, "Enable multiframe quality enhancement");
127 128
128 static const arg_def_t *vp8_pp_args[] = { 129 static const arg_def_t *vp8_pp_args[] = {
129 &addnoise_level, &deblock, &demacroblock_level, &pp_debug_info, 130 &addnoise_level, &deblock, &demacroblock_level, &pp_debug_info,
130 &pp_disp_ref_frame, &pp_disp_mb_modes, &pp_disp_b_modes, &pp_disp_mvs, &mfqe, 131 &pp_disp_ref_frame, &pp_disp_mb_modes, &pp_disp_b_modes, &pp_disp_mvs, &mfqe,
131 NULL 132 NULL
132 }; 133 };
133 #endif 134 #endif
134 135
135 #if CONFIG_LIBYUV 136 #if CONFIG_LIBYUV
136 static INLINE int libyuv_scale(vpx_image_t *src, vpx_image_t *dst, 137 static INLINE int libyuv_scale(vpx_image_t *src, vpx_image_t *dst,
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 &cfg, dec_flags)) { 807 &cfg, dec_flags)) {
807 fprintf(stderr, "Failed to initialize decoder: %s\n", 808 fprintf(stderr, "Failed to initialize decoder: %s\n",
808 vpx_codec_error(&decoder)); 809 vpx_codec_error(&decoder));
809 return EXIT_FAILURE; 810 return EXIT_FAILURE;
810 } 811 }
811 812
812 if (!quiet) 813 if (!quiet)
813 fprintf(stderr, "%s\n", decoder.name); 814 fprintf(stderr, "%s\n", decoder.name);
814 815
815 #if CONFIG_VP8_DECODER 816 #if CONFIG_VP8_DECODER
816
817 if (vp8_pp_cfg.post_proc_flag 817 if (vp8_pp_cfg.post_proc_flag
818 && vpx_codec_control(&decoder, VP8_SET_POSTPROC, &vp8_pp_cfg)) { 818 && vpx_codec_control(&decoder, VP8_SET_POSTPROC, &vp8_pp_cfg)) {
819 fprintf(stderr, "Failed to configure postproc: %s\n", vpx_codec_error(&decod er)); 819 fprintf(stderr, "Failed to configure postproc: %s\n",
820 vpx_codec_error(&decoder));
820 return EXIT_FAILURE; 821 return EXIT_FAILURE;
821 } 822 }
822 823
823 if (vp8_dbg_color_ref_frame 824 if (vp8_dbg_color_ref_frame
824 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_REF_FRAME, vp8_dbg_color_ ref_frame)) { 825 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_REF_FRAME,
825 fprintf(stderr, "Failed to configure reference block visualizer: %s\n", vpx_ codec_error(&decoder)); 826 vp8_dbg_color_ref_frame)) {
827 fprintf(stderr, "Failed to configure reference block visualizer: %s\n",
828 vpx_codec_error(&decoder));
826 return EXIT_FAILURE; 829 return EXIT_FAILURE;
827 } 830 }
828 831
829 if (vp8_dbg_color_mb_modes 832 if (vp8_dbg_color_mb_modes
830 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_MB_MODES, vp8_dbg_color_m b_modes)) { 833 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_MB_MODES,
831 fprintf(stderr, "Failed to configure macro block visualizer: %s\n", vpx_code c_error(&decoder)); 834 vp8_dbg_color_mb_modes)) {
835 fprintf(stderr, "Failed to configure macro block visualizer: %s\n",
836 vpx_codec_error(&decoder));
832 return EXIT_FAILURE; 837 return EXIT_FAILURE;
833 } 838 }
834 839
835 if (vp8_dbg_color_b_modes 840 if (vp8_dbg_color_b_modes
836 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_B_MODES, vp8_dbg_color_b_ modes)) { 841 && vpx_codec_control(&decoder, VP8_SET_DBG_COLOR_B_MODES,
837 fprintf(stderr, "Failed to configure block visualizer: %s\n", vpx_codec_erro r(&decoder)); 842 vp8_dbg_color_b_modes)) {
843 fprintf(stderr, "Failed to configure block visualizer: %s\n",
844 vpx_codec_error(&decoder));
838 return EXIT_FAILURE; 845 return EXIT_FAILURE;
839 } 846 }
840 847
841 if (vp8_dbg_display_mv 848 if (vp8_dbg_display_mv
842 && vpx_codec_control(&decoder, VP8_SET_DBG_DISPLAY_MV, vp8_dbg_display_mv) ) { 849 && vpx_codec_control(&decoder, VP8_SET_DBG_DISPLAY_MV,
843 fprintf(stderr, "Failed to configure motion vector visualizer: %s\n", vpx_co dec_error(&decoder)); 850 vp8_dbg_display_mv)) {
851 fprintf(stderr, "Failed to configure motion vector visualizer: %s\n",
852 vpx_codec_error(&decoder));
844 return EXIT_FAILURE; 853 return EXIT_FAILURE;
845 } 854 }
846 #endif 855 #endif
847 856
848 857
849 if (arg_skip) 858 if (arg_skip)
850 fprintf(stderr, "Skipping first %d frames.\n", arg_skip); 859 fprintf(stderr, "Skipping first %d frames.\n", arg_skip);
851 while (arg_skip) { 860 while (arg_skip) {
852 if (read_frame(&input, &buf, &bytes_in_buffer, &buffer_size)) 861 if (read_frame(&input, &buf, &bytes_in_buffer, &buffer_size))
853 break; 862 break;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 if (arg_match(&arg, &looparg, argi)) { 1154 if (arg_match(&arg, &looparg, argi)) {
1146 loops = arg_parse_uint(&arg); 1155 loops = arg_parse_uint(&arg);
1147 break; 1156 break;
1148 } 1157 }
1149 } 1158 }
1150 free(argv); 1159 free(argv);
1151 for (i = 0; !error && i < loops; i++) 1160 for (i = 0; !error && i < loops; i++)
1152 error = main_loop(argc, argv_); 1161 error = main_loop(argc, argv_);
1153 return error; 1162 return error;
1154 } 1163 }
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vpx_encoder.h ('k') | source/libvpx/vpxenc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698