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

Side by Side Diff: source/libvpx/vp8/encoder/onyx_if.c

Issue 13849011: libvpx: Pull from upstream (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 8 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/vp8/encoder/mcomp.c ('k') | source/libvpx/vp8/encoder/pickinter.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 FILE *kf_list; 104 FILE *kf_list;
105 FILE *keyfile; 105 FILE *keyfile;
106 #endif 106 #endif
107 107
108 #if 0 108 #if 0
109 extern int skip_true_count; 109 extern int skip_true_count;
110 extern int skip_false_count; 110 extern int skip_false_count;
111 #endif 111 #endif
112 112
113 113
114 #ifdef ENTROPY_STATS 114 #ifdef VP8_ENTROPY_STATS
115 extern int intra_mode_stats[10][10][10]; 115 extern int intra_mode_stats[10][10][10];
116 #endif 116 #endif
117 117
118 #ifdef SPEEDSTATS 118 #ifdef SPEEDSTATS
119 unsigned int frames_at_speed[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 119 unsigned int frames_at_speed[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
120 unsigned int tot_pm = 0; 120 unsigned int tot_pm = 0;
121 unsigned int cnt_pm = 0; 121 unsigned int cnt_pm = 0;
122 unsigned int tot_ef = 0; 122 unsigned int tot_ef = 0;
123 unsigned int cnt_ef = 0; 123 unsigned int cnt_ef = 0;
124 #endif 124 #endif
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 cpi->cyclic_refresh_mode_index = 0; 1798 cpi->cyclic_refresh_mode_index = 0;
1799 cpi->cyclic_refresh_q = 32; 1799 cpi->cyclic_refresh_q = 32;
1800 1800
1801 if (cpi->cyclic_refresh_mode_enabled) 1801 if (cpi->cyclic_refresh_mode_enabled)
1802 { 1802 {
1803 CHECK_MEM_ERROR(cpi->cyclic_refresh_map, vpx_calloc((cpi->common.mb_rows * cpi->common.mb_cols), 1)); 1803 CHECK_MEM_ERROR(cpi->cyclic_refresh_map, vpx_calloc((cpi->common.mb_rows * cpi->common.mb_cols), 1));
1804 } 1804 }
1805 else 1805 else
1806 cpi->cyclic_refresh_map = (signed char *) NULL; 1806 cpi->cyclic_refresh_map = (signed char *) NULL;
1807 1807
1808 #ifdef ENTROPY_STATS 1808 #ifdef VP8_ENTROPY_STATS
1809 init_context_counters(); 1809 init_context_counters();
1810 #endif 1810 #endif
1811 1811
1812 /*Initialize the feed-forward activity masking.*/ 1812 /*Initialize the feed-forward activity masking.*/
1813 cpi->activity_avg = 90<<12; 1813 cpi->activity_avg = 90<<12;
1814 1814
1815 /* Give a sensible default for the first frame. */ 1815 /* Give a sensible default for the first frame. */
1816 cpi->frames_since_key = 8; 1816 cpi->frames_since_key = 8;
1817 cpi->key_frame_frequency = cpi->oxcf.key_freq; 1817 cpi->key_frame_frequency = cpi->oxcf.key_freq;
1818 cpi->this_key_frame_forced = 0; 1818 cpi->this_key_frame_forced = 0;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 } 1916 }
1917 1917
1918 vp8_set_speed_features(cpi); 1918 vp8_set_speed_features(cpi);
1919 1919
1920 /* Set starting values of RD threshold multipliers (128 = *1) */ 1920 /* Set starting values of RD threshold multipliers (128 = *1) */
1921 for (i = 0; i < MAX_MODES; i++) 1921 for (i = 0; i < MAX_MODES; i++)
1922 { 1922 {
1923 cpi->mb.rd_thresh_mult[i] = 128; 1923 cpi->mb.rd_thresh_mult[i] = 128;
1924 } 1924 }
1925 1925
1926 #ifdef ENTROPY_STATS 1926 #ifdef VP8_ENTROPY_STATS
1927 init_mv_ref_counts(); 1927 init_mv_ref_counts();
1928 #endif 1928 #endif
1929 1929
1930 #if CONFIG_MULTITHREAD 1930 #if CONFIG_MULTITHREAD
1931 if(vp8cx_create_encoder_threads(cpi)) 1931 if(vp8cx_create_encoder_threads(cpi))
1932 { 1932 {
1933 vp8_remove_compressor(&cpi); 1933 vp8_remove_compressor(&cpi);
1934 return 0; 1934 return 0;
1935 } 1935 }
1936 #endif 1936 #endif
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 { 2053 {
2054 #if !(CONFIG_REALTIME_ONLY) 2054 #if !(CONFIG_REALTIME_ONLY)
2055 2055
2056 if (cpi->pass == 2) 2056 if (cpi->pass == 2)
2057 { 2057 {
2058 vp8_end_second_pass(cpi); 2058 vp8_end_second_pass(cpi);
2059 } 2059 }
2060 2060
2061 #endif 2061 #endif
2062 2062
2063 #ifdef ENTROPY_STATS 2063 #ifdef VP8_ENTROPY_STATS
2064 print_context_counters(); 2064 print_context_counters();
2065 print_tree_update_probs(); 2065 print_tree_update_probs();
2066 print_mode_context(); 2066 print_mode_context();
2067 #endif 2067 #endif
2068 2068
2069 #if CONFIG_INTERNAL_STATS 2069 #if CONFIG_INTERNAL_STATS
2070 2070
2071 if (cpi->pass != 1) 2071 if (cpi->pass != 1)
2072 { 2072 {
2073 FILE *f = fopen("opsnr.stt", "a"); 2073 FILE *f = fopen("opsnr.stt", "a");
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 } 2235 }
2236 fprintf(f, "P:%8d, %8d, %8d, %8d\n", count_mb_seg[0], count_mb_seg[1 ], count_mb_seg[2], count_mb_seg[3]); 2236 fprintf(f, "P:%8d, %8d, %8d, %8d\n", count_mb_seg[0], count_mb_seg[1 ], count_mb_seg[2], count_mb_seg[3]);
2237 fprintf(f, "PB:%8d, %8d, %8d, %8d\n", inter_b_modes[LEFT4X4], inter_ b_modes[ABOVE4X4], inter_b_modes[ZERO4X4], inter_b_modes[NEW4X4]); 2237 fprintf(f, "PB:%8d, %8d, %8d, %8d\n", inter_b_modes[LEFT4X4], inter_ b_modes[ABOVE4X4], inter_b_modes[ZERO4X4], inter_b_modes[NEW4X4]);
2238 2238
2239 2239
2240 2240
2241 fclose(f); 2241 fclose(f);
2242 } 2242 }
2243 #endif 2243 #endif
2244 2244
2245 #ifdef ENTROPY_STATS 2245 #ifdef VP8_ENTROPY_STATS
2246 { 2246 {
2247 int i, j, k; 2247 int i, j, k;
2248 FILE *fmode = fopen("modecontext.c", "w"); 2248 FILE *fmode = fopen("modecontext.c", "w");
2249 2249
2250 fprintf(fmode, "\n#include \"entropymode.h\"\n\n"); 2250 fprintf(fmode, "\n#include \"entropymode.h\"\n\n");
2251 fprintf(fmode, "const unsigned int vp8_kf_default_bmode_counts "); 2251 fprintf(fmode, "const unsigned int vp8_kf_default_bmode_counts ");
2252 fprintf(fmode, "[VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES ] =\n{\n"); 2252 fprintf(fmode, "[VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES ] =\n{\n");
2253 2253
2254 for (i = 0; i < 10; i++) 2254 for (i = 0; i < 10; i++)
2255 { 2255 {
(...skipping 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after
5510 } 5510 }
5511 5511
5512 return Total; 5512 return Total;
5513 } 5513 }
5514 5514
5515 5515
5516 int vp8_get_quantizer(VP8_COMP *cpi) 5516 int vp8_get_quantizer(VP8_COMP *cpi)
5517 { 5517 {
5518 return cpi->common.base_qindex; 5518 return cpi->common.base_qindex;
5519 } 5519 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/mcomp.c ('k') | source/libvpx/vp8/encoder/pickinter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698