Effect: Update rgba matrix reference to rgb.

The 4x4 matrix only updates the RGB channels, so it should be referred to as an rgb matrix, not an rgba matrix.

PiperOrigin-RevId: 557804613
This commit is contained in:
huangdarwin 2023-08-17 14:32:07 +01:00 committed by Julia Bibik
parent 3ae927525b
commit b814404c56

View File

@ -460,7 +460,7 @@ import java.util.List;
@Override @Override
public void drawFrame(int inputTexId, long presentationTimeUs) public void drawFrame(int inputTexId, long presentationTimeUs)
throws VideoFrameProcessingException { throws VideoFrameProcessingException {
updateCompositeRgbaMatrixArray(presentationTimeUs); updateCompositeRgbMatrixArray(presentationTimeUs);
updateCompositeTransformationMatrixAndVisiblePolygon(presentationTimeUs); updateCompositeTransformationMatrixAndVisiblePolygon(presentationTimeUs);
if (visiblePolygon.size() < 3) { if (visiblePolygon.size() < 3) {
return; // Need at least three visible vertices for a triangle. return; // Need at least three visible vertices for a triangle.
@ -562,7 +562,7 @@ import java.util.List;
} }
/** Updates {@link #compositeRgbMatrixArray} based on the given frame timestamp. */ /** Updates {@link #compositeRgbMatrixArray} based on the given frame timestamp. */
private void updateCompositeRgbaMatrixArray(long presentationTimeUs) { private void updateCompositeRgbMatrixArray(long presentationTimeUs) {
float[][] matricesCurrTimestamp = new float[rgbMatrices.size()][16]; float[][] matricesCurrTimestamp = new float[rgbMatrices.size()][16];
for (int i = 0; i < rgbMatrices.size(); i++) { for (int i = 0; i < rgbMatrices.size(); i++) {
matricesCurrTimestamp[i] = rgbMatrices.get(i).getMatrix(presentationTimeUs, useHdr); matricesCurrTimestamp[i] = rgbMatrices.get(i).getMatrix(presentationTimeUs, useHdr);