WSS data in vdr-xine

Message ID b98c6b1a0507140710740b4254@mail.gmail.com
State New
Headers

Commit Message

mike lewis July 14, 2005, 2:10 p.m. UTC
  > Well, in the case of vdr-xine, it's xine related, as xine has to deal
> with decoding the images. xine has the possibilty to do something like
> that (my patched expand post plugin makes use of it).
> 
> Just create a post video plugin that modifies crop_top / crop_bottom of
> each frame.
>
Ok, done.  Well, just for now (and as I have no idea how to do it
otherwise..) I've extended the expand plugin..  Only, I havn't had a
chance to test it yet.  Can you *please* comment on the code?

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, or
are they amount which is going to be left visible?  What would be an
easy way to find out?

Mick
  

Patch

--- /build/xine-lib-old/src/post/planar/expand.c	2005-07-14 22:08:48.000000000 +0800
+++ /build/xine-lib/src/post/planar/expand.c	2005-07-14 21:47:53.000000000 +0800
@@ -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,11 @@ 
       /* 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;
+    } else if (this->centre_cut_out_mode && this->hide_wss) {
+      frame->crop_top    += (frame->height - 10)
+      frame->crop_bottom += (frame->height - 10)
     }
+     
   }
 
   _x_post_frame_copy_down(frame, frame->next);