diff --git a/app/src/main/java/xdsopl/robot36/Decoder.java b/app/src/main/java/xdsopl/robot36/Decoder.java
index ee9b52c..af884f1 100644
--- a/app/src/main/java/xdsopl/robot36/Decoder.java
+++ b/app/src/main/java/xdsopl/robot36/Decoder.java
@@ -37,8 +37,8 @@ public class Decoder {
private final int channelConfig = AudioFormat.CHANNEL_IN_MONO;
private final int audioFormat = AudioFormat.ENCODING_PCM_16BIT;
private final int sampleRate = 44100;
- private final int maxHeight = freeRunReserve(496);
- private final int maxWidth = 640;
+ private final int maxHeight = freeRunReserve(616);
+ private final int maxWidth = 800;
private final short[] audioBuffer;
private final int[] pixelBuffer;
private final int[] spectrumBuffer;
@@ -72,7 +72,13 @@ public class Decoder {
private final int mode_scottie2 = 6;
private final int mode_scottieDX = 7;
private final int mode_wrasseSC2_180 = 8;
- private final int mode_pd180 = 9;
+ private final int mode_pd50 = 9;
+ private final int mode_pd90 = 10;
+ private final int mode_pd120 = 11;
+ private final int mode_pd160 = 12;
+ private final int mode_pd180 = 13;
+ private final int mode_pd240 = 14;
+ private final int mode_pd290 = 15;
private final Thread thread = new Thread() {
@Override
@@ -168,7 +174,13 @@ public class Decoder {
void scottie2_mode() { rsDecoder.invoke_scottie2_mode(); }
void scottieDX_mode() { rsDecoder.invoke_scottieDX_mode(); }
void wrasseSC2_180_mode() { rsDecoder.invoke_wrasseSC2_180_mode(); }
+ void pd50_mode() { rsDecoder.invoke_pd50_mode(); }
+ void pd90_mode() { rsDecoder.invoke_pd90_mode(); }
+ void pd120_mode() { rsDecoder.invoke_pd120_mode(); }
+ void pd160_mode() { rsDecoder.invoke_pd160_mode(); }
void pd180_mode() { rsDecoder.invoke_pd180_mode(); }
+ void pd240_mode() { rsDecoder.invoke_pd240_mode(); }
+ void pd290_mode() { rsDecoder.invoke_pd290_mode(); }
int freeRunReserve(int height) { return (height * 3) / 2; }
void increaseUpdateRate() { updateRate = Math.min(4, updateRate + 1); }
@@ -214,10 +226,34 @@ public class Decoder {
image.setImageResolution(320, freeRunReserve(256));
updateTitle(R.string.action_wrasseSC2_180_mode);
break;
+ case mode_pd50:
+ image.setImageResolution(320, freeRunReserve(256));
+ updateTitle(R.string.action_pd50_mode);
+ break;
+ case mode_pd90:
+ image.setImageResolution(320, freeRunReserve(256));
+ updateTitle(R.string.action_pd90_mode);
+ break;
+ case mode_pd120:
+ image.setImageResolution(640, freeRunReserve(496));
+ updateTitle(R.string.action_pd120_mode);
+ break;
+ case mode_pd160:
+ image.setImageResolution(512, freeRunReserve(400));
+ updateTitle(R.string.action_pd160_mode);
+ break;
case mode_pd180:
image.setImageResolution(640, freeRunReserve(496));
updateTitle(R.string.action_pd180_mode);
break;
+ case mode_pd240:
+ image.setImageResolution(640, freeRunReserve(496));
+ updateTitle(R.string.action_pd240_mode);
+ break;
+ case mode_pd290:
+ image.setImageResolution(800, freeRunReserve(616));
+ updateTitle(R.string.action_pd290_mode);
+ break;
default:
break;
}
diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java
index e9f4c9b..2aa2f29 100644
--- a/app/src/main/java/xdsopl/robot36/MainActivity.java
+++ b/app/src/main/java/xdsopl/robot36/MainActivity.java
@@ -240,9 +240,27 @@ public class MainActivity extends Activity {
case R.id.action_wrasseSC2_180_mode:
decoder.wrasseSC2_180_mode();
return true;
+ case R.id.action_pd50_mode:
+ decoder.pd50_mode();
+ return true;
+ case R.id.action_pd90_mode:
+ decoder.pd90_mode();
+ return true;
+ case R.id.action_pd120_mode:
+ decoder.pd120_mode();
+ return true;
+ case R.id.action_pd160_mode:
+ decoder.pd160_mode();
+ return true;
case R.id.action_pd180_mode:
decoder.pd180_mode();
return true;
+ case R.id.action_pd240_mode:
+ decoder.pd240_mode();
+ return true;
+ case R.id.action_pd290_mode:
+ decoder.pd290_mode();
+ return true;
}
return super.onOptionsItemSelected(item);
}
diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml
index b99315c..1793906 100644
--- a/app/src/main/res/menu/menu_main.xml
+++ b/app/src/main/res/menu/menu_main.xml
@@ -20,40 +20,42 @@
android:icon="@android:drawable/ic_menu_close_clear_cancel"
android:showAsAction="ifRoom" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 4e1e46e..dd050ad 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -1,6 +1,5 @@
-
Robot36
"Dekodierer läuft
Bild speichern
@@ -13,7 +12,13 @@
Roh Modus
Robot36 Modus
Robot72 Modus
+ PD50 Modus
+ PD90 Modus
+ PD120 Modus
+ PD160 Modus
PD180 Modus
+ PD240 Modus
+ PD290 Modus
Martin1 Modus
Martin2 Modus
Scottie1 Modus
@@ -28,5 +33,9 @@
Spektrogramm Ansicht
Aussteuerungsmesser Ansicht
Teilen
-
+ Robot Modi
+ PD Modi
+ Martin Modi
+ Scottie Modi
+ Wrasse Modi
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7ac82f9..4a2955a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,6 +1,5 @@
-
Robot36
"decoder is running
Save Image
@@ -13,7 +12,13 @@
Raw Mode
Robot36 Mode
Robot72 Mode
+ PD50 Mode
+ PD90 Mode
+ PD120 Mode
+ PD160 Mode
PD180 Mode
+ PD240 Mode
+ PD290 Mode
Martin1 Mode
Martin2 Mode
Scottie1 Mode
@@ -28,5 +33,9 @@
Spectrogram View
VU Meter View
Share
-
+ Robot Modes
+ PD Modes
+ Martin Modes
+ Scottie Modes
+ Wrasse Modes
diff --git a/app/src/main/rs/calibration_detector.rsh b/app/src/main/rs/calibration_detector.rsh
index c51ccdc..4cfbe90 100644
--- a/app/src/main/rs/calibration_detector.rsh
+++ b/app/src/main/rs/calibration_detector.rsh
@@ -111,8 +111,20 @@ static int calibration_detector(float dat_value, int cnt_quantized)
return mode_scottieDX;
case 0xb7:
return mode_wrasseSC2_180;
+ case 0xdd:
+ return mode_pd50;
+ case 0x63:
+ return mode_pd90;
+ case 0x5f:
+ return mode_pd120;
+ case 0xe2:
+ return mode_pd160;
case 0x60:
return mode_pd180;
+ case 0xe1:
+ return mode_pd240;
+ case 0xde:
+ return mode_pd290;
default:
return -1;
}
diff --git a/app/src/main/rs/constants.rsh b/app/src/main/rs/constants.rsh
index ff40d71..18f7fc2 100644
--- a/app/src/main/rs/constants.rsh
+++ b/app/src/main/rs/constants.rsh
@@ -33,7 +33,13 @@ static const int mode_scottie1 = 5;
static const int mode_scottie2 = 6;
static const int mode_scottieDX = 7;
static const int mode_wrasseSC2_180 = 8;
-static const int mode_pd180 = 9;
+static const int mode_pd50 = 9;
+static const int mode_pd90 = 10;
+static const int mode_pd120 = 11;
+static const int mode_pd160 = 12;
+static const int mode_pd180 = 13;
+static const int mode_pd240 = 14;
+static const int mode_pd290 = 15;
static const float sync_buildup_ms = 1.1f;
static const float scanline_tolerance = 0.05f;
diff --git a/app/src/main/rs/initialization.rsh b/app/src/main/rs/initialization.rsh
index 0742b4a..6c8cce0 100644
--- a/app/src/main/rs/initialization.rsh
+++ b/app/src/main/rs/initialization.rsh
@@ -56,7 +56,13 @@ void initialize(float rate, int length, int iw, int ih, int sw, int sh, int sgw,
scottie2_scanline_length = round((scottie2_scanline_ms * sample_rate) / 1000.0f);
scottieDX_scanline_length = round((scottieDX_scanline_ms * sample_rate) / 1000.0f);
wrasseSC2_180_scanline_length = round((wrasseSC2_180_scanline_ms * sample_rate) / 1000.0f);
+ pd50_scanline_length = round((pd50_scanline_ms * sample_rate) / 1000.0f);
+ pd90_scanline_length = round((pd90_scanline_ms * sample_rate) / 1000.0f);
+ pd120_scanline_length = round((pd120_scanline_ms * sample_rate) / 1000.0f);
+ pd160_scanline_length = round((pd160_scanline_ms * sample_rate) / 1000.0f);
pd180_scanline_length = round((pd180_scanline_ms * sample_rate) / 1000.0f);
+ pd240_scanline_length = round((pd240_scanline_ms * sample_rate) / 1000.0f);
+ pd290_scanline_length = round((pd290_scanline_ms * sample_rate) / 1000.0f);
const float pairwise_minimum_of_scanline_time_distances = 0.0079825f;
maximum_absolute_deviaton = 0.5f * pairwise_minimum_of_scanline_time_distances * sample_rate;
diff --git a/app/src/main/rs/modes.rsh b/app/src/main/rs/modes.rsh
index cb22c5a..01e840b 100644
--- a/app/src/main/rs/modes.rsh
+++ b/app/src/main/rs/modes.rsh
@@ -21,18 +21,10 @@ limitations under the License.
#include "state.rsh"
#include "exports.rsh"
-static int freerun_reserve(int height)
-{
- return (height * 3) / 2;
-}
-void toggle_auto()
-{
- automatic_mode_detection ^= 1;
-}
-void toggle_debug()
-{
- debug_mode ^= 1;
-}
+static int freerun_reserve(int height) { return (height * 3) / 2; }
+void toggle_auto() { automatic_mode_detection ^= 1; }
+void toggle_debug() { debug_mode ^= 1; }
+
void raw_mode()
{
blur_power = -1;
@@ -46,6 +38,7 @@ void raw_mode()
maximum_length = buffer_length;
scanline_length = maximum_length;
}
+
void robot36_mode()
{
blur_power = 2;
@@ -79,9 +72,10 @@ void robot36_mode()
u_end = v_end = round((uv_end_ms * sample_rate) / 1000.0f);
scanline_length = robot36_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * robot36_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * robot36_scanline_ms * sample_rate) / 1000.0f;
+ minimum_length = (1.0f - scanline_tolerance) * robot36_scanline_length;
+ maximum_length = (1.0f + scanline_tolerance) * robot36_scanline_length;
}
+
void robot72_mode()
{
blur_power = 3;
@@ -123,21 +117,21 @@ void robot72_mode()
u_end = round((u_end_ms * sample_rate) / 1000.0f);
scanline_length = robot72_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * robot72_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * robot72_scanline_ms * sample_rate) / 1000.0f;
+ minimum_length = (1.0f - scanline_tolerance) * robot72_scanline_length;
+ maximum_length = (1.0f + scanline_tolerance) * robot72_scanline_length;
}
-void pd180_mode()
+
+static void pd_mode(int mode, int scanline, int blur, float yuv_scan_ms, int width, int height)
{
- blur_power = 3;
- *current_mode = mode_pd180;
+ blur_power = blur;
+ *current_mode = mode;
current_decoder = decoder_pd;
- bitmap_width = 640;
- bitmap_height = 496;
+ bitmap_width = width;
+ bitmap_height = height;
freerun_height = freerun_reserve(bitmap_height);
const float tolerance = 0.8f;
const float sync_ms = 20.0f;
const float porch_ms = 2.08f;
- const float yuv_scan_ms = 183.04f;
sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
float y_even_begin_ms = porch_ms;
@@ -158,14 +152,22 @@ void pd180_mode()
y_odd_begin = round((y_odd_begin_ms * sample_rate) / 1000.0f);
y_odd_end = round((y_odd_end_ms * sample_rate) / 1000.0f);
- scanline_length = pd180_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * pd180_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * pd180_scanline_ms * sample_rate) / 1000.0f;
+ scanline_length = scanline;
+ minimum_length = (1.0f - scanline_tolerance) * scanline;
+ maximum_length = (1.0f + scanline_tolerance) * scanline;
}
-void martin1_mode()
+void pd50_mode() { pd_mode(mode_pd50, pd50_scanline_length, 3, 91.52f, 320, 256); }
+void pd90_mode() { pd_mode(mode_pd90, pd90_scanline_length, 4, 170.24f, 320, 256); }
+void pd120_mode() { pd_mode(mode_pd120, pd120_scanline_length, 3, 121.6f, 640, 496); }
+void pd160_mode() { pd_mode(mode_pd160, pd160_scanline_length, 4, 195.584f, 512, 400); }
+void pd180_mode() { pd_mode(mode_pd180, pd180_scanline_length, 3, 183.04f, 640, 496); }
+void pd240_mode() { pd_mode(mode_pd240, pd240_scanline_length, 4, 244.48f, 640, 496); }
+void pd290_mode() { pd_mode(mode_pd290, pd290_scanline_length, 3, 228.8f, 800, 616); }
+
+static void martin_mode(int mode, int scanline, int blur, float rgb_scan_ms)
{
- blur_power = 3;
- *current_mode = mode_martin1;
+ blur_power = blur;
+ *current_mode = mode;
current_decoder = decoder_rgb;
bitmap_width = 320;
bitmap_height = 256;
@@ -173,7 +175,6 @@ void martin1_mode()
const float tolerance = 0.5f;
const float sync_ms = 4.862f;
const float sync_porch_ms = 0.572f;
- const float rgb_scan_ms = 146.432f;
const float seperator_ms = 0.572f;
seperator_length = round((seperator_ms * sample_rate) / 1000.0f);
sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
@@ -192,48 +193,17 @@ void martin1_mode()
b_end = round((b_end_ms * sample_rate) / 1000.0f);
b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
- scanline_length = martin1_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * martin1_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * martin1_scanline_ms * sample_rate) / 1000.0f;
+ scanline_length = scanline;
+ minimum_length = (1.0f - scanline_tolerance) * scanline;
+ maximum_length = (1.0f + scanline_tolerance) * scanline;
}
-void martin2_mode()
+void martin1_mode() { martin_mode(mode_martin1, martin1_scanline_length, 3, 146.432f); }
+void martin2_mode() { martin_mode(mode_martin2, martin2_scanline_length, 2, 73.216f); }
+
+static void scottie_mode(int mode, int scanline, int blur, float rgb_scan_ms)
{
- blur_power = 2;
- *current_mode = mode_martin2;
- current_decoder = decoder_rgb;
- bitmap_width = 320;
- bitmap_height = 256;
- freerun_height = freerun_reserve(bitmap_height);
- const float tolerance = 0.5f;
- const float sync_ms = 4.862f;
- const float sync_porch_ms = 0.572f;
- const float rgb_scan_ms = 73.216f;
- const float seperator_ms = 0.572f;
- seperator_length = round((seperator_ms * sample_rate) / 1000.0f);
- sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
-
- float g_begin_ms = sync_porch_ms;
- float g_end_ms = g_begin_ms + rgb_scan_ms;
- float b_begin_ms = g_end_ms + seperator_ms;
- float b_end_ms = b_begin_ms + rgb_scan_ms;
- float r_begin_ms = b_end_ms + seperator_ms;
- float r_end_ms = r_begin_ms + rgb_scan_ms;
-
- r_begin = round((r_begin_ms * sample_rate) / 1000.0f);
- r_end = round((r_end_ms * sample_rate) / 1000.0f);
- g_end = round((g_end_ms * sample_rate) / 1000.0f);
- g_begin = round((g_begin_ms * sample_rate) / 1000.0f);
- b_end = round((b_end_ms * sample_rate) / 1000.0f);
- b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
-
- scanline_length = martin2_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * martin2_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * martin2_scanline_ms * sample_rate) / 1000.0f;
-}
-void scottie1_mode()
-{
- blur_power = 3;
- *current_mode = mode_scottie1;
+ blur_power = blur;
+ *current_mode = mode;
current_decoder = decoder_scottie;
bitmap_width = 320;
bitmap_height = 256;
@@ -241,7 +211,6 @@ void scottie1_mode()
const float tolerance = 0.8f;
const float sync_ms = 9.0f;
const float sync_porch_ms = 1.5f;
- const float rgb_scan_ms = 138.240f;
const float seperator_ms = 1.5f;
seperator_length = round((seperator_ms * sample_rate) / 1000.0f);
sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
@@ -260,78 +229,14 @@ void scottie1_mode()
b_end = round((b_end_ms * sample_rate) / 1000.0f);
b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
- scanline_length = scottie1_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * scottie1_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * scottie1_scanline_ms * sample_rate) / 1000.0f;
+ scanline_length = scanline;
+ minimum_length = (1.0f - scanline_tolerance) * scanline;
+ maximum_length = (1.0f + scanline_tolerance) * scanline;
}
-void scottie2_mode()
-{
- blur_power = 2;
- *current_mode = mode_scottie2;
- current_decoder = decoder_scottie;
- bitmap_width = 320;
- bitmap_height = 256;
- freerun_height = freerun_reserve(bitmap_height);
- const float tolerance = 0.8f;
- const float sync_ms = 9.0f;
- const float sync_porch_ms = 1.5f;
- const float rgb_scan_ms = 88.064f;
- const float seperator_ms = 1.5f;
- seperator_length = round((seperator_ms * sample_rate) / 1000.0f);
- sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
+void scottie1_mode() { scottie_mode(mode_scottie1, scottie1_scanline_length, 3, 138.240f); }
+void scottie2_mode() { scottie_mode(mode_scottie2, scottie2_scanline_length, 2, 88.064f); }
+void scottieDX_mode() { scottie_mode(mode_scottieDX, scottieDX_scanline_length, 5, 345.6f); }
- float r_begin_ms = sync_porch_ms;
- float r_end_ms = r_begin_ms + rgb_scan_ms;
- float b_end_ms = - sync_ms;
- float b_begin_ms = b_end_ms - rgb_scan_ms;
- float g_end_ms = b_begin_ms - seperator_ms;
- float g_begin_ms = g_end_ms - rgb_scan_ms;
-
- r_begin = round((r_begin_ms * sample_rate) / 1000.0f);
- r_end = round((r_end_ms * sample_rate) / 1000.0f);
- g_end = round((g_end_ms * sample_rate) / 1000.0f);
- g_begin = round((g_begin_ms * sample_rate) / 1000.0f);
- b_end = round((b_end_ms * sample_rate) / 1000.0f);
- b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
-
- scanline_length = scottie2_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * scottie2_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * scottie2_scanline_ms * sample_rate) / 1000.0f;
-}
-void scottieDX_mode()
-{
- blur_power = 5;
- *current_mode = mode_scottieDX;
- current_decoder = decoder_scottie;
- bitmap_width = 320;
- bitmap_height = 256;
- freerun_height = freerun_reserve(bitmap_height);
- const float tolerance = 0.8f;
- const float sync_ms = 9.0f;
- const float sync_porch_ms = 1.5f;
- const float rgb_scan_ms = 345.6f;
- const float seperator_ms = 1.5f;
- seperator_length = round((seperator_ms * sample_rate) / 1000.0f);
- sync_length = tolerance * (sync_ms * sample_rate) / 1000.0f;
-
- float r_begin_ms = sync_porch_ms;
- float r_end_ms = r_begin_ms + rgb_scan_ms;
- float b_end_ms = - sync_ms;
- float b_begin_ms = b_end_ms - rgb_scan_ms;
- float g_end_ms = b_begin_ms - seperator_ms;
- float g_begin_ms = g_end_ms - rgb_scan_ms;
-
- r_begin = round((r_begin_ms * sample_rate) / 1000.0f);
- r_end = round((r_end_ms * sample_rate) / 1000.0f);
- g_end = round((g_end_ms * sample_rate) / 1000.0f);
- g_begin = round((g_begin_ms * sample_rate) / 1000.0f);
- b_end = round((b_end_ms * sample_rate) / 1000.0f);
- b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
-
- scanline_length = scottieDX_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * scottieDX_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * scottieDX_scanline_ms * sample_rate) / 1000.0f;
-}
void wrasseSC2_180_mode()
{
blur_power = 4;
@@ -361,8 +266,8 @@ void wrasseSC2_180_mode()
b_begin = round((b_begin_ms * sample_rate) / 1000.0f);
scanline_length = wrasseSC2_180_scanline_length;
- minimum_length = ((1.0f - scanline_tolerance) * wrasseSC2_180_scanline_ms * sample_rate) / 1000.0f;
- maximum_length = ((1.0f + scanline_tolerance) * wrasseSC2_180_scanline_ms * sample_rate) / 1000.0f;
+ minimum_length = (1.0f - scanline_tolerance) * wrasseSC2_180_scanline_length;
+ maximum_length = (1.0f + scanline_tolerance) * wrasseSC2_180_scanline_length;
}
static void switch_mode(int new_mode)
@@ -394,9 +299,27 @@ static void switch_mode(int new_mode)
case mode_wrasseSC2_180:
wrasseSC2_180_mode();
break;
+ case mode_pd50:
+ pd50_mode();
+ break;
+ case mode_pd90:
+ pd90_mode();
+ break;
+ case mode_pd120:
+ pd120_mode();
+ break;
+ case mode_pd160:
+ pd160_mode();
+ break;
case mode_pd180:
pd180_mode();
break;
+ case mode_pd240:
+ pd240_mode();
+ break;
+ case mode_pd290:
+ pd290_mode();
+ break;
default:
return;
}
diff --git a/app/src/main/rs/scanline_estimator.rsh b/app/src/main/rs/scanline_estimator.rsh
index fac7bc3..b643a68 100644
--- a/app/src/main/rs/scanline_estimator.rsh
+++ b/app/src/main/rs/scanline_estimator.rsh
@@ -53,7 +53,13 @@ static int scanline_estimator(int sync_level)
int scottie2_adev = abs(mean - scottie2_scanline_length);
int scottieDX_adev = abs(mean - scottieDX_scanline_length);
int wrasseSC2_180_adev = abs(mean - wrasseSC2_180_scanline_length);
+ int pd50_adev = abs(mean - pd50_scanline_length);
+ int pd90_adev = abs(mean - pd90_scanline_length);
+ int pd120_adev = abs(mean - pd120_scanline_length);
+ int pd160_adev = abs(mean - pd160_scanline_length);
int pd180_adev = abs(mean - pd180_scanline_length);
+ int pd240_adev = abs(mean - pd240_scanline_length);
+ int pd290_adev = abs(mean - pd290_scanline_length);
int min_adev = min(
min(
@@ -65,7 +71,16 @@ static int scanline_estimator(int sync_level)
min(scottieDX_adev, wrasseSC2_180_adev)
)
),
- pd180_adev
+ min(
+ min(
+ min(pd50_adev, pd90_adev),
+ min(pd120_adev, pd160_adev)
+ ),
+ min(
+ min(pd180_adev, pd240_adev),
+ pd290_adev
+ )
+ )
);
if (min_adev > maximum_absolute_deviaton)
@@ -86,8 +101,20 @@ static int scanline_estimator(int sync_level)
return mode_scottieDX;
else if (min_adev == wrasseSC2_180_adev)
return mode_wrasseSC2_180;
+ else if (min_adev == pd50_adev)
+ return mode_pd50;
+ else if (min_adev == pd90_adev)
+ return mode_pd90;
+ else if (min_adev == pd120_adev)
+ return mode_pd120;
+ else if (min_adev == pd160_adev)
+ return mode_pd160;
else if (min_adev == pd180_adev)
return mode_pd180;
+ else if (min_adev == pd240_adev)
+ return mode_pd240;
+ else if (min_adev == pd290_adev)
+ return mode_pd290;
return -1;
}
diff --git a/app/src/main/rs/state.rsh b/app/src/main/rs/state.rsh
index 509116f..aadbb72 100644
--- a/app/src/main/rs/state.rsh
+++ b/app/src/main/rs/state.rsh
@@ -55,6 +55,12 @@ static int scottie1_scanline_length;
static int scottie2_scanline_length;
static int scottieDX_scanline_length;
static int wrasseSC2_180_scanline_length;
+static int pd50_scanline_length;
+static int pd90_scanline_length;
+static int pd120_scanline_length;
+static int pd160_scanline_length;
static int pd180_scanline_length;
+static int pd240_scanline_length;
+static int pd290_scanline_length;
#endif
\ No newline at end of file