1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 #include "mp4dec_lib.h"
19 
20 /* ====================================================================== /
21     Function : PutSKIPPED_MB()
22     Date     : 04/03/2000
23 / ====================================================================== */
24 
PutSKIPPED_MB(uint8 * comp,uint8 * prev,int width)25 void PutSKIPPED_MB(uint8 *comp, uint8 *prev, int width)
26 {
27     int32 *temp0, *temp1;
28     int  row;
29     row = MB_SIZE;
30 
31 
32     while (row)
33     {
34         temp0 = (int32 *)prev;
35         temp1 = (int32 *)comp;
36 
37         temp1[0] = temp0[0];
38         temp1[1] = temp0[1];
39         temp1[2] = temp0[2];
40         temp1[3] = temp0[3];
41 
42         comp += width;
43         prev += width;
44 
45         temp0 = (int32 *)prev;
46         temp1 = (int32 *)comp;
47 
48         temp1[0] = temp0[0];
49         temp1[1] = temp0[1];
50         temp1[2] = temp0[2];
51         temp1[3] = temp0[3];
52 
53         comp += width;
54         prev += width;
55 
56         temp0 = (int32 *)prev;
57         temp1 = (int32 *)comp;
58         temp1[0] = temp0[0];
59         temp1[1] = temp0[1];
60         temp1[2] = temp0[2];
61         temp1[3] = temp0[3];
62 
63 
64         comp += width;
65         prev += width;
66 
67         temp0 = (int32 *)prev;
68         temp1 = (int32 *)comp;
69         temp1[0] = temp0[0];
70         temp1[1] = temp0[1];
71         temp1[2] = temp0[2];
72         temp1[3] = temp0[3];
73 
74         comp += width;
75         prev += width;
76         row -= 4;
77     }
78 }
79 
80 
81 /* ====================================================================== /
82     Function : PutSKIPPED_B()
83     Date     : 04/03/2000
84 / ====================================================================== */
85 
PutSKIPPED_B(uint8 * comp,uint8 * prev,int width)86 void PutSKIPPED_B(uint8 *comp, uint8 *prev, int width)
87 {
88     int32 *temp0, *temp1;
89     int  row;
90 
91     row = B_SIZE;
92     while (row)
93     {
94         temp0 = (int32 *)prev;
95         temp1 = (int32 *)comp;
96 
97         temp1[0] = temp0[0];
98         temp1[1] = temp0[1];
99 
100         comp += width;
101         prev += width;
102 
103         temp0 = (int32 *)prev;
104         temp1 = (int32 *)comp;
105 
106         temp1[0] = temp0[0];
107         temp1[1] = temp0[1];
108 
109         comp += width;
110         prev += width;
111 
112         temp0 = (int32 *)prev;
113         temp1 = (int32 *)comp;
114 
115         temp1[0] = temp0[0];
116         temp1[1] = temp0[1];
117 
118         comp += width;
119         prev += width;
120 
121         temp0 = (int32 *)prev;
122         temp1 = (int32 *)comp;
123 
124         temp1[0] = temp0[0];
125         temp1[1] = temp0[1];
126 
127         comp += width;
128         prev += width;
129         row -= 4;
130     }
131 }
132 
133 
134