mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Reformat with google-java-format
This commit is contained in:
parent
ce0512845f
commit
b2f9c1e252
@ -287,7 +287,8 @@ public final class VobsubParser implements SubtitleParser {
|
||||
|| !hasPlane
|
||||
|| !hasColors
|
||||
|| boundingBox == null
|
||||
|| dataOffset0 == C.INDEX_UNSET || dataOffset1 == C.INDEX_UNSET
|
||||
|| dataOffset0 == C.INDEX_UNSET
|
||||
|| dataOffset1 == C.INDEX_UNSET
|
||||
|| boundingBox.width() < 2
|
||||
|| boundingBox.height() < 2) {
|
||||
return null;
|
||||
@ -301,7 +302,7 @@ public final class VobsubParser implements SubtitleParser {
|
||||
parseRleData(bitBuffer, /* evenInterlace= */ true, boundingBox, bitmapData);
|
||||
buffer.setPosition(dataOffset1);
|
||||
bitBuffer.reset(buffer);
|
||||
parseRleData(bitBuffer, /* evenInterlace= */ false,boundingBox, bitmapData);
|
||||
parseRleData(bitBuffer, /* evenInterlace= */ false, boundingBox, bitmapData);
|
||||
|
||||
Bitmap bitmap =
|
||||
Bitmap.createBitmap(
|
||||
@ -327,7 +328,8 @@ public final class VobsubParser implements SubtitleParser {
|
||||
* @param evenInterlace Whether to decode the even or odd interlaced lines.
|
||||
* @param bitmapData Output array.
|
||||
*/
|
||||
private void parseRleData(ParsableBitArray bitBuffer, boolean evenInterlace, Rect boundingBox, int[] bitmapData) {
|
||||
private void parseRleData(
|
||||
ParsableBitArray bitBuffer, boolean evenInterlace, Rect boundingBox, int[] bitmapData) {
|
||||
int width = boundingBox.width();
|
||||
int height = boundingBox.height();
|
||||
int x = 0;
|
||||
@ -346,7 +348,9 @@ public final class VobsubParser implements SubtitleParser {
|
||||
}
|
||||
if (x >= width) {
|
||||
y += 2;
|
||||
if (y >= height){ break;}
|
||||
if (y >= height) {
|
||||
break;
|
||||
}
|
||||
x = 0;
|
||||
outIndex = y * width;
|
||||
bitBuffer.byteAlign();
|
||||
|
Loading…
x
Reference in New Issue
Block a user