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

Side by Side Diff: source/libvpx/vp9/common/vp9_entropy.c

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropy.h ('k') | source/libvpx/vp9/common/vp9_frame_buffers.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
11 #include "vp9/common/vp9_entropy.h" 11 #include "vp9/common/vp9_entropy.h"
12 #include "vp9/common/vp9_blockd.h" 12 #include "vp9/common/vp9_blockd.h"
13 #include "vp9/common/vp9_onyxc_int.h" 13 #include "vp9/common/vp9_onyxc_int.h"
14 #include "vp9/common/vp9_entropymode.h" 14 #include "vp9/common/vp9_entropymode.h"
15 #include "vpx_mem/vpx_mem.h" 15 #include "vpx_mem/vpx_mem.h"
16 #include "vpx/vpx_integer.h" 16 #include "vpx/vpx_integer.h"
17 17
18 const vp9_prob vp9_cat1_prob[] = { 159 }; 18 const vp9_prob vp9_cat1_prob[] = { 159 };
19 const vp9_prob vp9_cat2_prob[] = { 165, 145 }; 19 const vp9_prob vp9_cat2_prob[] = { 165, 145 };
20 const vp9_prob vp9_cat3_prob[] = { 173, 148, 140 }; 20 const vp9_prob vp9_cat3_prob[] = { 173, 148, 140 };
21 const vp9_prob vp9_cat4_prob[] = { 176, 155, 140, 135 }; 21 const vp9_prob vp9_cat4_prob[] = { 176, 155, 140, 135 };
22 const vp9_prob vp9_cat5_prob[] = { 180, 157, 141, 134, 130 }; 22 const vp9_prob vp9_cat5_prob[] = { 180, 157, 141, 134, 130 };
23 const vp9_prob vp9_cat6_prob[] = { 23 const vp9_prob vp9_cat6_prob[] = {
24 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129 24 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129
25 }; 25 };
26 #if CONFIG_VP9_HIGHBITDEPTH
27 const vp9_prob vp9_cat1_prob_high10[] = { 159 };
28 const vp9_prob vp9_cat2_prob_high10[] = { 165, 145 };
29 const vp9_prob vp9_cat3_prob_high10[] = { 173, 148, 140 };
30 const vp9_prob vp9_cat4_prob_high10[] = { 176, 155, 140, 135 };
31 const vp9_prob vp9_cat5_prob_high10[] = { 180, 157, 141, 134, 130 };
32 const vp9_prob vp9_cat6_prob_high10[] = {
33 255, 255, 254, 254, 254, 252, 249, 243,
34 230, 196, 177, 153, 140, 133, 130, 129
35 };
36 const vp9_prob vp9_cat1_prob_high12[] = { 159 };
37 const vp9_prob vp9_cat2_prob_high12[] = { 165, 145 };
38 const vp9_prob vp9_cat3_prob_high12[] = { 173, 148, 140 };
39 const vp9_prob vp9_cat4_prob_high12[] = { 176, 155, 140, 135 };
40 const vp9_prob vp9_cat5_prob_high12[] = { 180, 157, 141, 134, 130 };
41 const vp9_prob vp9_cat6_prob_high12[] = {
42 255, 255, 255, 255, 254, 254, 254, 252, 249,
43 243, 230, 196, 177, 153, 140, 133, 130, 129
44 };
45 #endif
26 46
27 const uint8_t vp9_coefband_trans_8x8plus[1024] = { 47 const uint8_t vp9_coefband_trans_8x8plus[1024] = {
28 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 48 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
29 4, 4, 4, 4, 4, 5, 49 4, 4, 4, 4, 4, 5,
30 // beyond MAXBAND_INDEX+1 all values are filled as 5 50 // beyond MAXBAND_INDEX+1 all values are filled as 5
31 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 51 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
32 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 52 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
33 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 53 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
34 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 54 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
35 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 55 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 } else if (cm->last_frame_type == KEY_FRAME) { 802 } else if (cm->last_frame_type == KEY_FRAME) {
783 update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */ 803 update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */
784 count_sat = COEF_COUNT_SAT_AFTER_KEY; 804 count_sat = COEF_COUNT_SAT_AFTER_KEY;
785 } else { 805 } else {
786 update_factor = COEF_MAX_UPDATE_FACTOR; 806 update_factor = COEF_MAX_UPDATE_FACTOR;
787 count_sat = COEF_COUNT_SAT; 807 count_sat = COEF_COUNT_SAT;
788 } 808 }
789 for (t = TX_4X4; t <= TX_32X32; t++) 809 for (t = TX_4X4; t <= TX_32X32; t++)
790 adapt_coef_probs(cm, t, count_sat, update_factor); 810 adapt_coef_probs(cm, t, count_sat, update_factor);
791 } 811 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropy.h ('k') | source/libvpx/vp9/common/vp9_frame_buffers.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698