Strips are now disabled by default

This commit is contained in:
Martin Pulec
2021-05-05 14:12:52 +02:00
parent a4fdcc4292
commit 85bf15cb29
5 changed files with 16 additions and 13 deletions

View File

@@ -61,6 +61,10 @@ VR-specific changes
Changes
---------
### 2021-05-05
- `ug_receiver_parameters`/`ug_sender_parameters` - `disable_strips` -> `enable_strips`
rename (+ default is now disable - not sure if yet compatible with the pitches)
### 2021-05-03
- test sender now processes received RenderPacket and sends it back + option to generate
YUV 4:2:0 instead of RGBA

View File

@@ -120,7 +120,7 @@ struct ug_sender *ug_sender_init(const struct ug_sender_parameters *init_params)
return nullptr;
}
if (init_params->disable_strips == 0) {
if (init_params->enable_strips == 1) {
if (capture_filter_init(nullptr, "stripe", &s->stripe) != 0) {
abort();
}
@@ -244,7 +244,7 @@ struct ug_receiver *ug_receiver_start(struct ug_receiver_parameters *init_params
}
}
if (init_params->disable_strips == 0) {
if (init_params->enable_strips == 1) {
commandline_params["unstripe"] = string();
}

View File

@@ -51,7 +51,7 @@ struct ug_sender_parameters {
void *rprc_udata; ///< user data passed to the rprc callback (optional)
int port; ///< port (optional, default 5004)
int verbose; ///< verbosity level (optional, default 0, 1 - verbose, 2 - debug)
int disable_strips; ///< do not enable 8x1 strips (to improve compression), default 0 (enable)
int enable_strips; ///< enable 8x1 strips (to improve compression), default 0 (disable)
};
/**
@@ -77,7 +77,7 @@ struct ug_receiver_parameters {
libug_pixfmt_t decompress_to; ///< optional - pixel format to decompress to
bool force_gpu_decoding; ///< force GPU decoding (decode with GPUJPEG)
int verbose; ///< verbosity level (optional, default 0, 1 - verbose, 2 - debug)
int disable_strips; ///< do not enable 8x1 strips (to improve compression), default 0 (enable)
int enable_strips; ///< enable 8x1 strips (to improve compression), default 0 (disable)
};
LIBUG_DLL struct ug_receiver *ug_receiver_start(struct ug_receiver_parameters *init_params);
LIBUG_DLL void ug_receiver_done(struct ug_receiver *state);

View File

@@ -33,7 +33,7 @@ static void usage(const char *progname) {
printf("\t-h - show this help\n");
printf("\t-d - display (default vrg)\n");
printf("\t-c I420|RGBA|CUDA_I420|CUDA_RGBA - force decompress to codec\n");
printf("\t-n - disable strips\n");
printf("\t-S - enable strips\n");
printf("\t-v - increase verbosity (use twice for debug)\n");
}
@@ -41,7 +41,7 @@ int main(int argc, char *argv[]) {
struct ug_receiver_parameters init_params = { 0 };
int ch = 0;
while ((ch = getopt(argc, argv, "c:d:hnv")) != -1) {
while ((ch = getopt(argc, argv, "c:d:hSv")) != -1) {
switch (ch) {
case 'c':
assert(strcmp(optarg, "RGBA") == 0 || strcmp(optarg, "I420") == 0
@@ -62,8 +62,8 @@ int main(int argc, char *argv[]) {
case 'h':
usage(argv[0]);
return 0;
case 'n':
init_params.disable_strips = 1;
case 's':
init_params.enable_strips = 1;
break;
case 'v':
init_params.verbose += 1;

View File

@@ -45,7 +45,7 @@ static void usage(const char *progname) {
printf("\t-h - show this help\n");
printf("\t-j - use JPEG\n");
printf("\t-m - use specified MTU\n");
printf("\t-n - disable strips\n");
printf("\t-S - enable strips\n");
printf("\t-s - size (WxH)\n");
printf("\t-v - increase verbosity (use twice for debug)\n");
printf("\t-y - use YUV 4:2:0 instead of default RGBA\n");
@@ -103,14 +103,13 @@ int main(int argc, char *argv[]) {
init_params.compression = UG_UNCOMPRESSED;
init_params.rprc = render_packet_received_callback;
init_params.rprc_udata = &data;
bool disable_strips = false;
int width = DEFAULT_WIDTH;
int height = DEFAULT_HEIGHT;
libug_pixfmt_t codec = UG_RGBA;
double fps = DEFAULT_FPS;
int ch = 0;
while ((ch = getopt(argc, argv, "f:hjm:ns:vy")) != -1) {
while ((ch = getopt(argc, argv, "f:hjm:Ss:vy")) != -1) {
switch (ch) {
case 'f':
fps = atof(optarg);
@@ -124,8 +123,8 @@ int main(int argc, char *argv[]) {
case 'm':
init_params.mtu = atoi(optarg);
break;
case 'n':
init_params.disable_strips = 1;
case 'S':
init_params.enable_strips = 1;
break;
case 's':
width = atoi(optarg);