Skip to content

Commit

Permalink
Correct u4k.hdr10 package, correct 2160p resolution, correct folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Malinin committed Sep 3, 2021
1 parent 038a79c commit 4646b7b
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ public String toString() {

protected Quants2DBase(GeneratorFactory factory,
EncoderParameters params, String folder, String group) {
super(factory, params, folder, "Quants2D", group);
super(factory, params, folder + "/Quants2D", "Quants2D", group);
}

/** only package private direct children are allowed */
protected Quants2DBase(GeneratorFactory factory,
EncoderParameters params, NalUnitPostProcessor<Args> processor,
MuxerFactory muxer, String folder, String group) {
super(factory, params, processor, muxer, folder, "Quants2D", group);
super(factory, params, processor, muxer,
folder + "/Quants2D", "Quants2D", group);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
@GenerateVideo(MAIN)
public class Quants2D1080p extends Quants2DBase8 {
public Quants2D1080p() {
super(AVC, FULLHD_MAIN8, "FullHD/Quants2D", "1080p");
super(AVC, FULLHD_MAIN8, "FullHD", "1080p");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
@GenerateVideo
public class Quants2D1080pHEVC extends Quants2DBase8 {
public Quants2D1080pHEVC() {
super(HEVC, FULLHD_MAIN8, "FullHD/BT709/Quants2D", "FHD");
super(HEVC, FULLHD_MAIN8, "FullHD/BT709", "FHD");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
public class Quants2D1080pHLG10 extends Quants2DBase10HDR {
public Quants2D1080pHLG10() {
super(HEVC, new EncoderParameters(STD_1080p, HLG10, FPS_23_976),
"FullHD/HLG10/Quants2D", "FHD_HLG10");
"FullHD/HLG10", "FHD_HLG10");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
@GenerateVideo
public class Quants2D2160pBT709 extends Quants2DBase8 {
public Quants2D2160pBT709() {
super(HEVC, UHD4K_MAIN8, "UHD4K/BT709/Quants2D", "U4K");
super(HEVC, UHD4K_MAIN8, "UHD4K/BT709", "U4K");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
@GenerateVideo
public class Quants2D2160pBT2020 extends Quants2DBase10 {
public Quants2D2160pBT2020() {
super(HEVC, UHD4K_MAIN10, "UHD4K/BT2020_10/Quants2D", "U4K_2020");
super(HEVC, UHD4K_MAIN10, "UHD4K/BT2020_10", "U4K_2020");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.basic.hdr10;
package band.full.test.video.patterns.basic.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.generator.GeneratorFactory.HEVC;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.basic.hdr10;
package band.full.test.video.patterns.basic.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.executor.GenerateVideo.Type.LOSSLESS;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.basic.hdr10;
package band.full.test.video.patterns.basic.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.generator.GeneratorFactory.HEVC;
Expand All @@ -14,6 +14,6 @@
@GenerateVideo
public class Quants2D2160pHDR10 extends Quants2DBase10HDR {
public Quants2D2160pHDR10() {
super(HEVC, HDR10, "UHD4K/HDR10/Quants2D", "U4K_HDR10");
super(HEVC, HDR10, "UHD4K/HDR10", "U4K_HDR10");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.basic.hdr10;
package band.full.test.video.patterns.basic.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.generator.GeneratorFactory.HEVC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
@GenerateVideo
public class Quants2D2160pHLG10 extends Quants2DBase10HDR {
public Quants2D2160pHLG10() {
super(HEVC, HLG10, "UHD4K/HLG10/Quants2D", "U4K_HLG10");
super(HEVC, HLG10, "UHD4K/HLG10", "U4K_HLG10");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package band.full.test.video.patterns.calibrate.u4k;

import static band.full.test.video.encoder.EncoderParameters.FULLHD_MAIN8;
import static band.full.test.video.encoder.EncoderParameters.UHD4K_MAIN8;
import static band.full.test.video.generator.GeneratorFactory.HEVC;

import band.full.test.video.executor.GenerateVideo;
Expand All @@ -12,6 +12,6 @@
@GenerateVideo
public class CalibrateColorChecker2160pBT709 extends CalibrateColorCheckerBase {
public CalibrateColorChecker2160pBT709() {
super(HEVC, FULLHD_MAIN8, "UHD4K/BT709", "U4K");
super(HEVC, UHD4K_MAIN8, "UHD4K/BT709", "U4K");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package band.full.test.video.patterns.calibrate.u4k;

import static band.full.test.video.encoder.EncoderParameters.FULLHD_MAIN8;
import static band.full.test.video.encoder.EncoderParameters.UHD4K_MAIN8;
import static band.full.test.video.generator.GeneratorFactory.HEVC;

import band.full.test.video.executor.GenerateVideo;
Expand All @@ -12,6 +12,6 @@
@GenerateVideo
public class CalibrateGrayscale2160pBT709 extends CalibrateGrayscaleBase {
public CalibrateGrayscale2160pBT709() {
super(HEVC, FULLHD_MAIN8, "UHD4K/BT709", "U4K");
super(HEVC, UHD4K_MAIN8, "UHD4K/BT709", "U4K");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.calibrate.hdr10;
package band.full.test.video.patterns.calibrate.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.generator.GeneratorFactory.HEVC;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package band.full.test.video.patterns.calibrate.hdr10;
package band.full.test.video.patterns.calibrate.u4k.hdr10;

import static band.full.test.video.encoder.EncoderParameters.HDR10;
import static band.full.test.video.generator.GeneratorFactory.HEVC;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package band.full.test.video.patterns.calman.u4k;

import static band.full.test.video.encoder.EncoderParameters.FULLHD_MAIN8;
import static band.full.test.video.encoder.EncoderParameters.UHD4K_MAIN8;
import static band.full.test.video.generator.GeneratorFactory.HEVC;

import band.full.test.video.executor.GenerateVideo;
Expand All @@ -13,6 +13,6 @@
public class CalibrateSaturation2160pBT709_CalMAN
extends CalibrateSaturationBase_CalMAN {
public CalibrateSaturation2160pBT709_CalMAN() {
super(HEVC, FULLHD_MAIN8, "UHD4K/BT709", "U4K");
super(HEVC, UHD4K_MAIN8, "UHD4K/BT709", "U4K");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
import static band.full.test.video.generator.GeneratorFactory.HEVC;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.DV_P5;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.dmContentRange10K;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.dmContentRangeSDR;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.dmDataPayload;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.muxer;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.processor;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.rpuDataMappingNominal;
import static band.full.test.video.patterns.u4k.dv.DolbyVisionProfile5.rpuHeader;
import static band.full.video.dolby.IPTPQc2.PQ10IPTc2;
import static java.util.function.Function.identity;

import band.full.test.video.executor.GenerateVideo;
import band.full.test.video.generator.Quants2DBase10HDR;
import band.full.video.dolby.RPU;

import java.util.stream.Stream;

/**
* Testing color bands separation / quantization step uniformity.
*
Expand All @@ -24,7 +29,33 @@ public class Quants2D2160pDVp5 extends Quants2DBase10HDR {
rpuHeader(), rpuDataMappingNominal(),
dmDataPayload(dmContentRange10K()));

private static final RPU RPU_SDR = new RPU(
rpuHeader(), rpuDataMappingNominal(),
dmDataPayload(dmContentRangeSDR()));

private static RPU rpu(Args args, int fragment, int frame) {
double sdrCode = PQ10IPTc2.toLumaCode(
PQ10IPTc2.transfer.fromLinear(0.01));

return (args.yMin() + ROWS < sdrCode) ? RPU_SDR : RPU;
}

public Quants2D2160pDVp5() {
super(HEVC, DV_P5, processor(RPU), muxer(), "UHD4K/DVp5", "U4K_DVp5");
super(HEVC, DV_P5, processor(Quants2D2160pDVp5::rpu), muxer(),
"UHD4K/DVp5", "U4K_DVp5");
}

@Override
protected Stream<Args> args() {
return Stream.of(
quants("NearBlack", 0, 32),
quants("DarkGray", 64, 128),
quants("Gray", 256),
quants("LightGray", 384),
quants("NearWhite", 512),
quants("Bright", 640),
quants("Brighter", 768),
quants("Brightest", 896)
).flatMap(identity());
}
}

0 comments on commit 4646b7b

Please sign in to comment.