-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPicture.java
More file actions
64 lines (49 loc) · 1.11 KB
/
Copy pathPicture.java
File metadata and controls
64 lines (49 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package cn.edu.ustc.aaron.common;
public class Picture {
int[] bufY;
int[] bufCb;
int[] bufCr;
int width;
int height;
int widthC;
int heightC;
public Picture (int width, int height) {
this.width = width;
this.height = height;
this.widthC = width >> 1;
this.heightC = height >> 1;
bufY = new int[width * height];
bufCb = new int[widthC * heightC];
bufCr = new int[widthC * heightC];
}
public int getWidth () {
return width;
}
public int getHeight () {
return height;
}
public int getWidthC () {
return widthC;
}
public int getHeightC () {
return heightC;
}
public int[] getY () {
return bufY;
}
public int getY (int i) {
return bufY[i];
}
public int[] getCb () {
return bufCb;
}
public int getCb (int i) {
return bufCb[i];
}
public int[] getCr () {
return bufCr;
}
public int getV (int i) {
return bufCr[i];
}
}