From bfae980c79f91ba4d910edb00234a024aaa5a420 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 23 Dec 2011 13:32:10 +0100 Subject: [PATCH] typo: 3d->interleaved -> 3d-interlaced --- ultragrid/Makefile.in | 2 +- ultragrid/src/main.c | 8 ++--- ultragrid/src/vo_postprocess.c | 8 ++--- .../{3d-interleaved.c => 3d-interlaced.c} | 33 ++++++++++--------- .../{3d-interleaved.h => 3d-interlaced.h} | 10 +++--- 5 files changed, 32 insertions(+), 29 deletions(-) rename ultragrid/src/vo_postprocess/{3d-interleaved.c => 3d-interlaced.c} (83%) rename ultragrid/src/vo_postprocess/{3d-interleaved.h => 3d-interlaced.h} (85%) diff --git a/ultragrid/Makefile.in b/ultragrid/Makefile.in index 359c3b178..e9f141c7d 100644 --- a/ultragrid/Makefile.in +++ b/ultragrid/Makefile.in @@ -75,7 +75,7 @@ OBJS = src/bitstream.o \ src/video_display.o \ src/video_display/null.o \ src/vo_postprocess.o \ - src/vo_postprocess/3d-interleaved.o \ + src/vo_postprocess/3d-interlaced.o \ src/vo_postprocess/split.o \ @DELTACAST_OBJ@ \ @DVS_OBJ@ \ diff --git a/ultragrid/src/main.c b/ultragrid/src/main.c index 927d09515..388cff9ee 100644 --- a/ultragrid/src/main.c +++ b/ultragrid/src/main.c @@ -876,16 +876,16 @@ int main(int argc, char *argv[]) } /* following block only shows help (otherwise initialized in receiver thread */ - if((uv->postprocess && strcmp(uv->postprocess, "help") == 0) || - (uv->decoder_mode && strcmp(uv->decoder_mode, "help") == 0)) { + if((uv->postprocess && strstr(uv->postprocess, "help") != NULL) || + (uv->decoder_mode && strstr(uv->decoder_mode, "help") != NULL)) { struct state_decoder *dec = decoder_init(uv->decoder_mode, uv->postprocess); decoder_destroy(dec); exit_status = EXIT_SUCCESS; goto cleanup; } /* following block only shows help (otherwise initialized in sender thread */ - if(uv->requested_compression && strcmp(uv->compress_options,"help") == 0) { - struct compress_state *compression = compress_init("help"); + if(uv->requested_compression && strstr(uv->compress_options,"help") != NULL) { + struct compress_state *compression = compress_init(uv->compress_options); compress_done(compression); exit_status = EXIT_SUCCESS; goto cleanup; diff --git a/ultragrid/src/vo_postprocess.c b/ultragrid/src/vo_postprocess.c index 38b8273e2..c3f717444 100644 --- a/ultragrid/src/vo_postprocess.c +++ b/ultragrid/src/vo_postprocess.c @@ -53,7 +53,7 @@ #include #include #include "vo_postprocess.h" -#include "vo_postprocess/3d-interleaved.h" +#include "vo_postprocess/3d-interlaced.h" #include "vo_postprocess/split.h" struct vo_postprocess_t { @@ -71,9 +71,9 @@ struct vo_postprocess_state { }; const struct vo_postprocess_t vo_postprocess_modules[] = { - {"3d-interleaved", interleaved_3d_init, interleaved_3d_postprocess_reconfigure, - interleaved_3d_get_out_desc, - interleaved_3d_postprocess, interleaved_3d_done }, + {"3d-interlaced", interlaced_3d_init, interlaced_3d_postprocess_reconfigure, + interlaced_3d_get_out_desc, + interlaced_3d_postprocess, interlaced_3d_done }, {"split", split_init, split_postprocess_reconfigure, split_get_out_desc, split_postprocess, split_done }, diff --git a/ultragrid/src/vo_postprocess/3d-interleaved.c b/ultragrid/src/vo_postprocess/3d-interlaced.c similarity index 83% rename from ultragrid/src/vo_postprocess/3d-interleaved.c rename to ultragrid/src/vo_postprocess/3d-interlaced.c index 6aa9c8724..2848a0b8e 100644 --- a/ultragrid/src/vo_postprocess/3d-interleaved.c +++ b/ultragrid/src/vo_postprocess/3d-interlaced.c @@ -53,26 +53,29 @@ #include "video_display.h" /* DISPLAY_PROPERTY_VIDEO_SEPARATE_FILES */ #include #include -#include "vo_postprocess/3d-interleaved.h" +#include "vo_postprocess/3d-interlaced.h" -struct state_interleaved_3d { +struct state_interlaced_3d { struct video_frame *in; }; -void * interleaved_3d_init(char *config) { - struct state_interleaved_3d *s; - UNUSED(config); +void * interlaced_3d_init(char *config) { + struct state_interlaced_3d *s; - s = (struct state_interleaved_3d *) - malloc(sizeof(struct state_interleaved_3d)); + if(config && strcmp(config, "help") == 0) { + printf("3d-interlaced takes no parameters.\n"); + return NULL; + } + s = (struct state_interlaced_3d *) + malloc(sizeof(struct state_interlaced_3d)); s->in = vf_alloc(2); return s; } -struct video_frame * interleaved_3d_postprocess_reconfigure(void *state, struct video_desc desc) +struct video_frame * interlaced_3d_postprocess_reconfigure(void *state, struct video_desc desc) { - struct state_interleaved_3d *s = (struct state_interleaved_3d *) state; + struct state_interlaced_3d *s = (struct state_interlaced_3d *) state; assert(desc.tile_count == 2); @@ -93,7 +96,7 @@ struct video_frame * interleaved_3d_postprocess_reconfigure(void *state, struct return s->in; } -void interleaved_3d_postprocess(void *state, struct video_frame *in, struct video_frame *out, int req_pitch) +void interlaced_3d_postprocess(void *state, struct video_frame *in, struct video_frame *out, int req_pitch) { int x; @@ -102,7 +105,7 @@ void interleaved_3d_postprocess(void *state, struct video_frame *in, struct vide /* we compute avg from line k/2*2 and k/2*2+1 for left eye and put * to (k/2*2)th line. Than we compute avg of same lines number - * and put it to the following line, which creates interleaved stereo */ + * and put it to the following line, which creates interlaced stereo */ for (x = 0; x < vf_get_tile(out, 0)->height; ++x) { int linepos; char *line1 = vf_get_tile(in, x % 2)->data + (x / 2) * 2 * linesize; @@ -123,9 +126,9 @@ void interleaved_3d_postprocess(void *state, struct video_frame *in, struct vide } } -void interleaved_3d_done(void *state) +void interlaced_3d_done(void *state) { - struct state_interleaved_3d *s = (struct state_interleaved_3d *) state; + struct state_interlaced_3d *s = (struct state_interlaced_3d *) state; free(vf_get_tile(s->in, 0)->data); free(vf_get_tile(s->in, 1)->data); @@ -133,9 +136,9 @@ void interleaved_3d_done(void *state) free(state); } -void interleaved_3d_get_out_desc(void *state, struct video_desc *out, int *in_display_mode) +void interlaced_3d_get_out_desc(void *state, struct video_desc *out, int *in_display_mode) { - struct state_interleaved_3d *s = (struct state_interleaved_3d *) state; + struct state_interlaced_3d *s = (struct state_interlaced_3d *) state; out->width = vf_get_tile(s->in, 0)->width; /* not *2 !!!!!!*/ out->height = vf_get_tile(s->in, 0)->height; diff --git a/ultragrid/src/vo_postprocess/3d-interleaved.h b/ultragrid/src/vo_postprocess/3d-interlaced.h similarity index 85% rename from ultragrid/src/vo_postprocess/3d-interleaved.h rename to ultragrid/src/vo_postprocess/3d-interlaced.h index edc15c667..d8d9404d9 100644 --- a/ultragrid/src/vo_postprocess/3d-interleaved.h +++ b/ultragrid/src/vo_postprocess/3d-interlaced.h @@ -47,9 +47,9 @@ #include "video_codec.h" -void * interleaved_3d_init(char *config); -struct video_frame * interleaved_3d_postprocess_reconfigure(void *state, struct video_desc desc); -void interleaved_3d_get_out_desc(void *state, struct video_desc *out, int *display_mode); -void interleaved_3d_postprocess(void *state, struct video_frame *in, struct video_frame *out, int req_pitch); -void interleaved_3d_done(void *state); +void * interlaced_3d_init(char *config); +struct video_frame * interlaced_3d_postprocess_reconfigure(void *state, struct video_desc desc); +void interlaced_3d_get_out_desc(void *state, struct video_desc *out, int *display_mode); +void interlaced_3d_postprocess(void *state, struct video_frame *in, struct video_frame *out, int req_pitch); +void interlaced_3d_done(void *state);