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

Side by Side Diff: source/libvpx/vp8/encoder/arm/arm_csystemdependent.c

Issue 7671004: Update libvpx snapshot to v0.9.7-p1 (Cayuga). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: '' Created 9 years, 4 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
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 11
12 #include "vpx_ports/config.h" 12 #include "vpx_ports/config.h"
13 #include "vpx_ports/arm.h" 13 #include "vpx_ports/arm.h"
14 #include "vp8/encoder/variance.h" 14 #include "vp8/encoder/variance.h"
15 #include "vp8/encoder/onyx_int.h" 15 #include "vp8/encoder/onyx_int.h"
16 16
17 extern void (*vp8_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12 _BUFFER_CONFIG *dst_ybc, int Fraction); 17 extern void (*vp8_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12 _BUFFER_CONFIG *dst_ybc, int Fraction);
18 extern void vp8_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER _CONFIG *dst_ybc, int Fraction); 18 extern void vp8_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER _CONFIG *dst_ybc, int Fraction);
19 extern void vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BU FFER_CONFIG *dst_ybc, int Fraction); 19 extern void vpxyv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BU FFER_CONFIG *dst_ybc, int Fraction);
20 20
21 void vp8_arch_arm_encoder_init(VP8_COMP *cpi) 21 void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
22 { 22 {
23 #if CONFIG_RUNTIME_CPU_DETECT 23 #if CONFIG_RUNTIME_CPU_DETECT
24 int flags = cpi->common.rtcd.flags; 24 int flags = cpi->common.rtcd.flags;
25 int has_edsp = flags & HAS_EDSP; 25
26 int has_media = flags & HAS_MEDIA; 26 #if HAVE_ARMV5TE
27 int has_neon = flags & HAS_NEON; 27 if (flags & HAS_EDSP)
28 {
29 }
30 #endif
28 31
29 #if HAVE_ARMV6 32 #if HAVE_ARMV6
30 if (has_media) 33 if (flags & HAS_MEDIA)
31 { 34 {
32 cpi->rtcd.variance.sad16x16 = vp8_sad16x16_armv6; 35 cpi->rtcd.variance.sad16x16 = vp8_sad16x16_armv6;
33 /*cpi->rtcd.variance.sad16x8 = vp8_sad16x8_c; 36 /*cpi->rtcd.variance.sad16x8 = vp8_sad16x8_c;
34 cpi->rtcd.variance.sad8x16 = vp8_sad8x16_c; 37 cpi->rtcd.variance.sad8x16 = vp8_sad8x16_c;
35 cpi->rtcd.variance.sad8x8 = vp8_sad8x8_c; 38 cpi->rtcd.variance.sad8x8 = vp8_sad8x8_c;
36 cpi->rtcd.variance.sad4x4 = vp8_sad4x4_c;*/ 39 cpi->rtcd.variance.sad4x4 = vp8_sad4x4_c;*/
37 40
38 /*cpi->rtcd.variance.var4x4 = vp8_variance4x4_c;*/ 41 /*cpi->rtcd.variance.var4x4 = vp8_variance4x4_c;*/
39 cpi->rtcd.variance.var8x8 = vp8_variance8x8_armv6; 42 cpi->rtcd.variance.var8x8 = vp8_variance8x8_armv6;
40 /*cpi->rtcd.variance.var8x16 = vp8_variance8x16_c; 43 /*cpi->rtcd.variance.var8x16 = vp8_variance8x16_c;
41 cpi->rtcd.variance.var16x8 = vp8_variance16x8_c;*/ 44 cpi->rtcd.variance.var16x8 = vp8_variance16x8_c;*/
42 cpi->rtcd.variance.var16x16 = vp8_variance16x16_armv6; 45 cpi->rtcd.variance.var16x16 = vp8_variance16x16_armv6;
43 46
44 /*cpi->rtcd.variance.subpixvar4x4 = vp8_sub_pixel_variance4x4_c ;*/ 47 /*cpi->rtcd.variance.subpixvar4x4 = vp8_sub_pixel_variance4x4_c ;*/
45 cpi->rtcd.variance.subpixvar8x8 = vp8_sub_pixel_variance8x8_arm v6; 48 cpi->rtcd.variance.subpixvar8x8 = vp8_sub_pixel_variance8x8_arm v6;
46 /*cpi->rtcd.variance.subpixvar8x16 = vp8_sub_pixel_variance8x16_ c; 49 /*cpi->rtcd.variance.subpixvar8x16 = vp8_sub_pixel_variance8x16_ c;
47 cpi->rtcd.variance.subpixvar16x8 = vp8_sub_pixel_variance16x8_c; */ 50 cpi->rtcd.variance.subpixvar16x8 = vp8_sub_pixel_variance16x8_c; */
48 cpi->rtcd.variance.subpixvar16x16 = vp8_sub_pixel_variance16x16_a rmv6; 51 cpi->rtcd.variance.subpixvar16x16 = vp8_sub_pixel_variance16x16_a rmv6;
49 cpi->rtcd.variance.halfpixvar16x16_h = vp8_variance_halfpixvar16x16_ h_armv6; 52 cpi->rtcd.variance.halfpixvar16x16_h = vp8_variance_halfpixvar16x16_ h_armv6;
50 cpi->rtcd.variance.halfpixvar16x16_v = vp8_variance_halfpixvar16x16_ v_armv6; 53 cpi->rtcd.variance.halfpixvar16x16_v = vp8_variance_halfpixvar16x16_ v_armv6;
51 cpi->rtcd.variance.halfpixvar16x16_hv = vp8_variance_halfpixvar16x16_ hv_armv6; 54 cpi->rtcd.variance.halfpixvar16x16_hv = vp8_variance_halfpixvar16x16_ hv_armv6;
52 55
53 cpi->rtcd.variance.mse16x16 = vp8_mse16x16_armv6; 56 cpi->rtcd.variance.mse16x16 = vp8_mse16x16_armv6;
54 /*cpi->rtcd.variance.getmbss = vp8_get_mb_ss_c;*/ 57 /*cpi->rtcd.variance.getmbss = vp8_get_mb_ss_c;*/
55 58
56 /*cpi->rtcd.variance.get16x16prederror = vp8_get16x16pred_error_c; 59 /*cpi->rtcd.variance.get4x4sse_cs = vp8_get4x4sse_cs_c;*/
57 cpi->rtcd.variance.get8x8var = vp8_get8x8var_c;
58 cpi->rtcd.variance.get16x16var = vp8_get16x16var_c;;
59 cpi->rtcd.variance.get4x4sse_cs = vp8_get4x4sse_cs_c;*/
60 60
61 /*cpi->rtcd.fdct.short4x4 = vp8_short_fdct4x4_c; 61 /*cpi->rtcd.fdct.short4x4 = vp8_short_fdct4x4_c;
62 cpi->rtcd.fdct.short8x4 = vp8_short_fdct8x4_c;*/ 62 cpi->rtcd.fdct.short8x4 = vp8_short_fdct8x4_c;*/
63 cpi->rtcd.fdct.fast4x4 = vp8_fast_fdct4x4_armv6; 63 cpi->rtcd.fdct.fast4x4 = vp8_fast_fdct4x4_armv6;
64 cpi->rtcd.fdct.fast8x4 = vp8_fast_fdct8x4_armv6; 64 cpi->rtcd.fdct.fast8x4 = vp8_fast_fdct8x4_armv6;
65 cpi->rtcd.fdct.walsh_short4x4 = vp8_short_walsh4x4_armv6; 65 cpi->rtcd.fdct.walsh_short4x4 = vp8_short_walsh4x4_armv6;
66 66
67 /*cpi->rtcd.encodemb.berr = vp8_block_error_c; 67 /*cpi->rtcd.encodemb.berr = vp8_block_error_c;
68 cpi->rtcd.encodemb.mberr = vp8_mbblock_error_c; 68 cpi->rtcd.encodemb.mberr = vp8_mbblock_error_c;
69 cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_c;*/ 69 cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_c;*/
70 cpi->rtcd.encodemb.subb = vp8_subtract_b_armv6; 70 cpi->rtcd.encodemb.subb = vp8_subtract_b_armv6;
71 cpi->rtcd.encodemb.submby = vp8_subtract_mby_armv6; 71 cpi->rtcd.encodemb.submby = vp8_subtract_mby_armv6;
72 cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_armv6; 72 cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_armv6;
73 73
74 /*cpi->rtcd.quantize.quantb = vp8_regular_quantize_b;*/ 74 /*cpi->rtcd.quantize.quantb = vp8_regular_quantize_b;*/
75 cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_armv6; 75 cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_armv6;
76 } 76 }
77 #endif 77 #endif
78 78
79 #if HAVE_ARMV7 79 #if HAVE_ARMV7
80 if (has_neon) 80 if (flags & HAS_NEON)
81 { 81 {
82 cpi->rtcd.variance.sad16x16 = vp8_sad16x16_neon; 82 cpi->rtcd.variance.sad16x16 = vp8_sad16x16_neon;
83 cpi->rtcd.variance.sad16x8 = vp8_sad16x8_neon; 83 cpi->rtcd.variance.sad16x8 = vp8_sad16x8_neon;
84 cpi->rtcd.variance.sad8x16 = vp8_sad8x16_neon; 84 cpi->rtcd.variance.sad8x16 = vp8_sad8x16_neon;
85 cpi->rtcd.variance.sad8x8 = vp8_sad8x8_neon; 85 cpi->rtcd.variance.sad8x8 = vp8_sad8x8_neon;
86 cpi->rtcd.variance.sad4x4 = vp8_sad4x4_neon; 86 cpi->rtcd.variance.sad4x4 = vp8_sad4x4_neon;
87 87
88 /*cpi->rtcd.variance.var4x4 = vp8_variance4x4_c;*/ 88 /*cpi->rtcd.variance.var4x4 = vp8_variance4x4_c;*/
89 cpi->rtcd.variance.var8x8 = vp8_variance8x8_neon; 89 cpi->rtcd.variance.var8x8 = vp8_variance8x8_neon;
90 cpi->rtcd.variance.var8x16 = vp8_variance8x16_neon; 90 cpi->rtcd.variance.var8x16 = vp8_variance8x16_neon;
91 cpi->rtcd.variance.var16x8 = vp8_variance16x8_neon; 91 cpi->rtcd.variance.var16x8 = vp8_variance16x8_neon;
92 cpi->rtcd.variance.var16x16 = vp8_variance16x16_neon; 92 cpi->rtcd.variance.var16x16 = vp8_variance16x16_neon;
93 93
94 /*cpi->rtcd.variance.subpixvar4x4 = vp8_sub_pixel_variance4x4_c ;*/ 94 /*cpi->rtcd.variance.subpixvar4x4 = vp8_sub_pixel_variance4x4_c ;*/
95 cpi->rtcd.variance.subpixvar8x8 = vp8_sub_pixel_variance8x8_neo n; 95 cpi->rtcd.variance.subpixvar8x8 = vp8_sub_pixel_variance8x8_neo n;
96 /*cpi->rtcd.variance.subpixvar8x16 = vp8_sub_pixel_variance8x16_ c; 96 /*cpi->rtcd.variance.subpixvar8x16 = vp8_sub_pixel_variance8x16_ c;
97 cpi->rtcd.variance.subpixvar16x8 = vp8_sub_pixel_variance16x8_c; */ 97 cpi->rtcd.variance.subpixvar16x8 = vp8_sub_pixel_variance16x8_c; */
98 cpi->rtcd.variance.subpixvar16x16 = vp8_sub_pixel_variance16x16_n eon; 98 cpi->rtcd.variance.subpixvar16x16 = vp8_sub_pixel_variance16x16_n eon;
99 cpi->rtcd.variance.halfpixvar16x16_h = vp8_variance_halfpixvar16x16_ h_neon; 99 cpi->rtcd.variance.halfpixvar16x16_h = vp8_variance_halfpixvar16x16_ h_neon;
100 cpi->rtcd.variance.halfpixvar16x16_v = vp8_variance_halfpixvar16x16_ v_neon; 100 cpi->rtcd.variance.halfpixvar16x16_v = vp8_variance_halfpixvar16x16_ v_neon;
101 cpi->rtcd.variance.halfpixvar16x16_hv = vp8_variance_halfpixvar16x16_ hv_neon; 101 cpi->rtcd.variance.halfpixvar16x16_hv = vp8_variance_halfpixvar16x16_ hv_neon;
102 102
103 cpi->rtcd.variance.mse16x16 = vp8_mse16x16_neon; 103 cpi->rtcd.variance.mse16x16 = vp8_mse16x16_neon;
104 /*cpi->rtcd.variance.getmbss = vp8_get_mb_ss_c;*/ 104 /*cpi->rtcd.variance.getmbss = vp8_get_mb_ss_c;*/
105 105
106 cpi->rtcd.variance.get16x16prederror = vp8_get16x16pred_error_neon;
107 /*cpi->rtcd.variance.get8x8var = vp8_get8x8var_c;
108 cpi->rtcd.variance.get16x16var = vp8_get16x16var_c;*/
109 cpi->rtcd.variance.get4x4sse_cs = vp8_get4x4sse_cs_neon; 106 cpi->rtcd.variance.get4x4sse_cs = vp8_get4x4sse_cs_neon;
110 107
111 cpi->rtcd.fdct.short4x4 = vp8_short_fdct4x4_neon; 108 cpi->rtcd.fdct.short4x4 = vp8_short_fdct4x4_neon;
112 cpi->rtcd.fdct.short8x4 = vp8_short_fdct8x4_neon; 109 cpi->rtcd.fdct.short8x4 = vp8_short_fdct8x4_neon;
113 cpi->rtcd.fdct.fast4x4 = vp8_fast_fdct4x4_neon; 110 cpi->rtcd.fdct.fast4x4 = vp8_fast_fdct4x4_neon;
114 cpi->rtcd.fdct.fast8x4 = vp8_fast_fdct8x4_neon; 111 cpi->rtcd.fdct.fast8x4 = vp8_fast_fdct8x4_neon;
115 cpi->rtcd.fdct.walsh_short4x4 = vp8_short_walsh4x4_neon; 112 cpi->rtcd.fdct.walsh_short4x4 = vp8_short_walsh4x4_neon;
116 113
117 /*cpi->rtcd.encodemb.berr = vp8_block_error_c; 114 /*cpi->rtcd.encodemb.berr = vp8_block_error_c;
118 cpi->rtcd.encodemb.mberr = vp8_mbblock_error_c; 115 cpi->rtcd.encodemb.mberr = vp8_mbblock_error_c;
119 cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_c;*/ 116 cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_c;*/
120 cpi->rtcd.encodemb.subb = vp8_subtract_b_neon; 117 cpi->rtcd.encodemb.subb = vp8_subtract_b_neon;
121 cpi->rtcd.encodemb.submby = vp8_subtract_mby_neon; 118 cpi->rtcd.encodemb.submby = vp8_subtract_mby_neon;
122 cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_neon; 119 cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_neon;
123 120
124 /*cpi->rtcd.quantize.quantb = vp8_regular_quantize_b; 121 /*cpi->rtcd.quantize.quantb = vp8_regular_quantize_b;
125 cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_c;*/ 122 cpi->rtcd.quantize.quantb_pair = vp8_regular_quantize_b_pair;* /
126 /* The neon quantizer has not been updated to match the new exact 123 cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_neon;
127 * quantizer introduced in commit e04e2935 124 cpi->rtcd.quantize.fastquantb_pair = vp8_fast_quantize_b_pair_neon ;
128 */
129 /*cpi->rtcd.quantize.fastquantb = vp8_fast_quantize_b_neon;*/
130 } 125 }
131 #endif 126 #endif
132 127
133 #if HAVE_ARMV7 128 #if HAVE_ARMV7
134 #if CONFIG_RUNTIME_CPU_DETECT 129 #if CONFIG_RUNTIME_CPU_DETECT
135 if (has_neon) 130 if (flags & HAS_NEON)
136 #endif 131 #endif
137 { 132 {
138 vp8_yv12_copy_partial_frame_ptr = vpxyv12_copy_partial_frame_neon; 133 vp8_yv12_copy_partial_frame_ptr = vpxyv12_copy_partial_frame_neon;
139 } 134 }
140 #endif 135 #endif
141 #endif 136 #endif
142 } 137 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/decoder/x86/x86_dsystemdependent.c ('k') | source/libvpx/vp8/encoder/arm/armv6/vp8_mse16x16_armv6.asm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698