[xine-devel] Re: [vdr] WSS data in vdr-xine
Commit Message
On 7/14/05, James Stembridge <jstembridge@gmail.com> wrote:
> On 7/14/05, mike lewis <lachlanlewis@gmail.com> wrote:
> > What I'd really like to know is this: what actually are crop_top /
> > crop_bottom? Are they the amount that is to be cropped in pixels
>
> Yes.
>
OK, the following patch will "cut" 100 lines from the bottom of the
video. This is not exactly what I was hoping for.. What I was hoping
for was a way to cut the video before the content was "expanded".
[xine-devel please note this is an already patched version of expand.c
adding "centre cut out mode" from
Can anyone offer any advice on how this can be achieved?
Mick
Comments
Hi,
mike lewis wrote:
> @@ -435,7 +444,13 @@
> /* get_frame() allocated an extra high frame */
> frame->crop_top += (frame->next->height - frame->height) / 2;
> frame->crop_bottom += (frame->next->height - frame->height) / 2;
> + }
> + if (this->hide_wss) {
> + frame->crop_top += 0;
> + frame->crop_bottom += 10;
> }
> +
> }
>
> _x_post_frame_copy_down(frame, frame->next);
I've changed a few lines above and it should cut off 10 additional lines
at the bottom (should work for 16:9 and 4:3), but I haven't tested it.
Be aware that the resulting frame is no longer 16:9 nor 4:3. But as the
aspect ratio is not adjusted, it will be stretched vertically by the
video output driver to be 16:9 or 4:3.
See also next eMail about this issue.
Bye.
@@ -69,6 +69,7 @@
int enable_automatic_shift;
int overlay_y_offset;
int centre_cut_out_mode;
+ int hide_wss;
} expand_parameters_t;
START_PARAM_DESCR(expand_parameters_t)
@@ -78,6 +79,8 @@
"manually shift the overlay vertically")
PARAM_ITEM(POST_PARAM_TYPE_BOOL, centre_cut_out_mode, NULL, 0, 1, 0,
"cut out centered 4:3 image contained in 16:9 frame")
+PARAM_ITEM(POST_PARAM_TYPE_BOOL, hide_wss, NULL, 0, 1, 0,
+ "cut out WSS data from the frame")
END_PARAM_DESCR(expand_param_descr)
typedef struct post_expand_s {
@@ -89,6 +92,7 @@
int overlay_y_offset;
int top_bar_height;
int centre_cut_out_mode;
+ int hide_wss;
int cropping_active;
} post_expand_t;
@@ -162,6 +166,7 @@
this->enable_automatic_shift = 0;
this->overlay_y_offset = 0;
this->centre_cut_out_mode = 0;
+ this->hide_wss = 0;
this->cropping_active = 0;
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, &output);
@@ -224,6 +229,7 @@
this->enable_automatic_shift = param->enable_automatic_shift;
this->overlay_y_offset = param->overlay_y_offset;
this->centre_cut_out_mode = param->centre_cut_out_mode;
+ this->hide_wss = param->hide_wss;
return 1;
}
@@ -236,6 +242,7 @@
param->enable_automatic_shift = this->enable_automatic_shift;
param->overlay_y_offset = this->overlay_y_offset;
param->centre_cut_out_mode = this->centre_cut_out_mode;
+ param->hide_wss = this->hide_wss;
return 1;
}
@@ -250,6 +257,8 @@
" Enable_automatic_shift: Enable automatic overlay shifting\n"
" Overlay_y_offset: Manually shift the overlay vertically\n"
" Centre_cut_out_mode: extracts 4:3 image contained in 16:9 frame\n"
+ " hide_wss: hides the WSS stream data which can be displayed as\n"
+ " white dots at the top or bottom of each frame\n"
"\n"
);
}
@@ -435,7 +444,13 @@
/* get_frame() allocated an extra high frame */
frame->crop_top += (frame->next->height - frame->height) / 2;
frame->crop_bottom += (frame->next->height - frame->height) / 2;
+ }
+ if (this->hide_wss) {
+ //frame->crop_top += (frame->height - 10);
+ frame->crop_top = 0;
+ frame->crop_bottom = 100;
}
+
}
_x_post_frame_copy_down(frame, frame->next);