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

Side by Side Diff: source/libvpx/vp9/common/mips/dspr2/vp9_itrans32_dspr2.c

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 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) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 <assert.h> 11 #include <assert.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 13
14 #include "./vpx_config.h" 14 #include "./vpx_config.h"
15 #include "./vp9_rtcd.h" 15 #include "./vp9_rtcd.h"
16 #include "vp9/common/vp9_common.h" 16 #include "vp9/common/vp9_common.h"
17 #include "vp9/common/vp9_blockd.h" 17 #include "vp9/common/vp9_blockd.h"
18 #include "vp9/common/vp9_idct.h" 18 #include "vp9/common/vp9_idct.h"
19 #include "vp9/common/mips/dspr2/vp9_common_dspr2.h" 19 #include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
20 20
21 #if HAVE_DSPR2 21 #if HAVE_DSPR2
22 static void idct32_1d_rows_dspr2(const int16_t *input, int16_t *output, 22 static void idct32_rows_dspr2(const int16_t *input, int16_t *output,
23 uint32_t no_rows) { 23 uint32_t no_rows) {
24 int16_t step1_0, step1_1, step1_2, step1_3, step1_4, step1_5, step1_6; 24 int16_t step1_0, step1_1, step1_2, step1_3, step1_4, step1_5, step1_6;
25 int16_t step1_7, step1_8, step1_9, step1_10, step1_11, step1_12, step1_13; 25 int16_t step1_7, step1_8, step1_9, step1_10, step1_11, step1_12, step1_13;
26 int16_t step1_14, step1_15, step1_16, step1_17, step1_18, step1_19, step1_20; 26 int16_t step1_14, step1_15, step1_16, step1_17, step1_18, step1_19, step1_20;
27 int16_t step1_21, step1_22, step1_23, step1_24, step1_25, step1_26, step1_27; 27 int16_t step1_21, step1_22, step1_23, step1_24, step1_25, step1_26, step1_27;
28 int16_t step1_28, step1_29, step1_30, step1_31; 28 int16_t step1_28, step1_29, step1_30, step1_31;
29 int16_t step2_0, step2_1, step2_2, step2_3, step2_4, step2_5, step2_6; 29 int16_t step2_0, step2_1, step2_2, step2_3, step2_4, step2_5, step2_6;
30 int16_t step2_7, step2_8, step2_9, step2_10, step2_11, step2_12, step2_13; 30 int16_t step2_7, step2_8, step2_9, step2_10, step2_11, step2_12, step2_13;
31 int16_t step2_14, step2_15, step2_16, step2_17, step2_18, step2_19, step2_20; 31 int16_t step2_14, step2_15, step2_16, step2_17, step2_18, step2_19, step2_20;
32 int16_t step2_21, step2_22, step2_23, step2_24, step2_25, step2_26, step2_27; 32 int16_t step2_21, step2_22, step2_23, step2_24, step2_25, step2_26, step2_27;
33 int16_t step2_28, step2_29, step2_30, step2_31; 33 int16_t step2_28, step2_29, step2_30, step2_31;
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 uint32_t pos = 45; 875 uint32_t pos = 45;
876 876
877 /* bit positon for extract from acc */ 877 /* bit positon for extract from acc */
878 __asm__ __volatile__ ( 878 __asm__ __volatile__ (
879 "wrdsp %[pos], 1 \n\t" 879 "wrdsp %[pos], 1 \n\t"
880 : 880 :
881 : [pos] "r" (pos) 881 : [pos] "r" (pos)
882 ); 882 );
883 883
884 // Rows 884 // Rows
885 idct32_1d_rows_dspr2(input, outptr, 32); 885 idct32_rows_dspr2(input, outptr, 32);
886 886
887 // Columns 887 // Columns
888 vp9_idct32_1d_cols_add_blk_dspr2(out, dest, dest_stride); 888 vp9_idct32_cols_add_blk_dspr2(out, dest, dest_stride);
889 } 889 }
890 890
891 void vp9_idct32x32_34_add_dspr2(const int16_t *input, uint8_t *dest, 891 void vp9_idct32x32_34_add_dspr2(const int16_t *input, uint8_t *dest,
892 int stride) { 892 int stride) {
893 DECLARE_ALIGNED(32, int16_t, out[32 * 32]); 893 DECLARE_ALIGNED(32, int16_t, out[32 * 32]);
894 int16_t *outptr = out; 894 int16_t *outptr = out;
895 uint32_t i; 895 uint32_t i;
896 uint32_t pos = 45; 896 uint32_t pos = 45;
897 897
898 /* bit positon for extract from acc */ 898 /* bit positon for extract from acc */
899 __asm__ __volatile__ ( 899 __asm__ __volatile__ (
900 "wrdsp %[pos], 1 \n\t" 900 "wrdsp %[pos], 1 \n\t"
901 : 901 :
902 : [pos] "r" (pos) 902 : [pos] "r" (pos)
903 ); 903 );
904 904
905 // Rows 905 // Rows
906 idct32_1d_rows_dspr2(input, outptr, 8); 906 idct32_rows_dspr2(input, outptr, 8);
907 907
908 outptr += 8; 908 outptr += 8;
909 __asm__ __volatile__ ( 909 __asm__ __volatile__ (
910 "sw $zero, 0(%[outptr]) \n\t" 910 "sw $zero, 0(%[outptr]) \n\t"
911 "sw $zero, 4(%[outptr]) \n\t" 911 "sw $zero, 4(%[outptr]) \n\t"
912 "sw $zero, 8(%[outptr]) \n\t" 912 "sw $zero, 8(%[outptr]) \n\t"
913 "sw $zero, 12(%[outptr]) \n\t" 913 "sw $zero, 12(%[outptr]) \n\t"
914 "sw $zero, 16(%[outptr]) \n\t" 914 "sw $zero, 16(%[outptr]) \n\t"
915 "sw $zero, 20(%[outptr]) \n\t" 915 "sw $zero, 20(%[outptr]) \n\t"
916 "sw $zero, 24(%[outptr]) \n\t" 916 "sw $zero, 24(%[outptr]) \n\t"
(...skipping 23 matching lines...) Expand all
940 "sw $zero, 36(%[outptr]) \n\t" 940 "sw $zero, 36(%[outptr]) \n\t"
941 "sw $zero, 40(%[outptr]) \n\t" 941 "sw $zero, 40(%[outptr]) \n\t"
942 "sw $zero, 44(%[outptr]) \n\t" 942 "sw $zero, 44(%[outptr]) \n\t"
943 943
944 : 944 :
945 : [outptr] "r" (outptr) 945 : [outptr] "r" (outptr)
946 ); 946 );
947 } 947 }
948 948
949 // Columns 949 // Columns
950 vp9_idct32_1d_cols_add_blk_dspr2(out, dest, stride); 950 vp9_idct32_cols_add_blk_dspr2(out, dest, stride);
951 } 951 }
952 952
953 void vp9_idct32x32_1_add_dspr2(const int16_t *input, uint8_t *dest, 953 void vp9_idct32x32_1_add_dspr2(const int16_t *input, uint8_t *dest,
954 int stride) { 954 int stride) {
955 int r, out; 955 int r, out;
956 int32_t a1, absa1; 956 int32_t a1, absa1;
957 int32_t vector_a1; 957 int32_t vector_a1;
958 int32_t t1, t2, t3, t4; 958 int32_t t1, t2, t3, t4;
959 int32_t vector_1, vector_2, vector_3, vector_4; 959 int32_t vector_1, vector_2, vector_3, vector_4;
960 uint32_t pos = 45; 960 uint32_t pos = 45;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 : [t1] "=&r" (t1), [t2] "=&r" (t2), [t3] "=&r" (t3), [t4] "=&r" (t4), 1067 : [t1] "=&r" (t1), [t2] "=&r" (t2), [t3] "=&r" (t3), [t4] "=&r" (t4),
1068 [vector_1] "=&r" (vector_1), [vector_2] "=&r" (vector_2), 1068 [vector_1] "=&r" (vector_1), [vector_2] "=&r" (vector_2),
1069 [vector_3] "=&r" (vector_3), [vector_4] "=&r" (vector_4), 1069 [vector_3] "=&r" (vector_3), [vector_4] "=&r" (vector_4),
1070 [dest] "+&r" (dest) 1070 [dest] "+&r" (dest)
1071 : [stride] "r" (stride), [vector_a1] "r" (vector_a1) 1071 : [stride] "r" (stride), [vector_a1] "r" (vector_a1)
1072 ); 1072 );
1073 } 1073 }
1074 } 1074 }
1075 } 1075 }
1076 #endif // #if HAVE_DSPR2 1076 #endif // #if HAVE_DSPR2
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c ('k') | source/libvpx/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698