Add unscaled getWidth/Height to TextureBuffer interface
Bug: b/289762633 Change-Id: I36a8c108ca03d464cd4dd08441dc9b64077343c1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316860 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Fabian Bergmark <fabianbergmark@google.com> Cr-Commit-Position: refs/heads/main@{#40567}
This commit is contained in:
parent
31251fa817
commit
70483a59aa
@ -140,18 +140,12 @@ public class TextureBufferImpl implements VideoFrame.TextureBuffer {
|
||||
(int) Math.round(unscaledHeight * cropHeight / (float) height), scaleWidth, scaleHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the texture in memory. This should only be used for downscaling, and you
|
||||
* should still respect the width from getWidth().
|
||||
*/
|
||||
@Override
|
||||
public int getUnscaledWidth() {
|
||||
return unscaledWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the texture in memory. This should only be used for downscaling, and you
|
||||
* should still respect the height from getHeight().
|
||||
*/
|
||||
@Override
|
||||
public int getUnscaledHeight() {
|
||||
return unscaledHeight;
|
||||
}
|
||||
|
||||
@ -146,6 +146,22 @@ public class VideoFrame implements RefCounted {
|
||||
Matrix transformMatrix, int newWidth, int newHeight) {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the texture in memory. This should only be used for downscaling, and you
|
||||
* should still respect the width from getWidth().
|
||||
*/
|
||||
default public int getUnscaledWidth() {
|
||||
return getWidth();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the texture in memory. This should only be used for downscaling, and
|
||||
* you should still respect the height from getHeight().
|
||||
*/
|
||||
default public int getUnscaledHeight() {
|
||||
return getHeight();
|
||||
}
|
||||
}
|
||||
|
||||
private final Buffer buffer;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user