www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,25 @@
|
|||
package org.jcodec.scale;
|
||||
|
||||
import org.jcodec.common.model.Picture;
|
||||
|
||||
public class RgbToYuv422p implements Transform {
|
||||
public void transform(Picture img, Picture dst) {
|
||||
byte[] y = img.getData()[0];
|
||||
byte[] out1 = new byte[3];
|
||||
byte[] out2 = new byte[3];
|
||||
byte[][] dstData = dst.getData();
|
||||
int off = 0, offSrc = 0;
|
||||
for (int i = 0; i < img.getHeight(); i++) {
|
||||
for (int j = 0; j < img.getWidth() >> 1; j++) {
|
||||
int offY = off << 1;
|
||||
RgbToYuv420p.rgb2yuv(y[offSrc++], y[offSrc++], y[offSrc++], out1);
|
||||
dstData[0][offY] = out1[0];
|
||||
RgbToYuv420p.rgb2yuv(y[offSrc++], y[offSrc++], y[offSrc++], out2);
|
||||
dstData[0][offY + 1] = out2[0];
|
||||
dstData[1][off] = (byte)(out1[1] + out2[1] + 1 >> 1);
|
||||
dstData[2][off] = (byte)(out1[2] + out2[2] + 1 >> 1);
|
||||
off++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue