Web lists-archives.org

Re: Grabbing 4:3 and 16:9




On Tue, Feb 26, 2008 at 06:12:42PM +0100, Michel Bardiaux wrote:
> As I find more relevant pages, my question has now become: given a 
> 768x576 capture (by a BT878) can I check whether the PALPLUS is there?

WSS is in the first line of the 576 line picture.
One of the bits says if there is PALplus.

WSS standard:
http://webapp.etsi.org/WorkProgram/Report_WorkItem.asp?WKI_ID=16170

PALplus standard:
http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=3850

You can use libzvbi to decode the information:

vbi_raw_decoder_init(&vbi_rd);
vbi_rd.scanning = 625;
vbi_rd.sampling_format = VBI_PIXFMT_YUYV;
vbi_rd.sampling_rate = 13500000.0*width/702;
vbi_rd.offset = 186*width/924;
vbi_rd.bytes_per_line = width*2;
vbi_rd.start[0] = 23;
vbi_rd.count[0] = 1;
vbi_rd.start[1] = 0;
vbi_rd.count[1] = 0;
vbi_rd.interlaced = 0;
vbi_rd.synchronous = 1;
vbi_raw_decoder_add_services(&vbi_rd,VBI_SLICED_WSS_625,0);
while(framebuf=grabpicture()) {
  vbi_sliced sliced;
  if(vbi_raw_decode (&vbi_rd, framebuf, &sliced)
     && sliced.id==VBI_SLICED_WSS_625)
  {
    wss=(sliced.data[1]<<8)+sliced.data[0];
    if(wss&64) {
      /* There is PALplus
      
         I have seen the decoder generate false positives.
	 Check aspect ratio bits for >=16:9 and their odd parity bit
	 to be shure. */
    }
  }
}

  Daniel

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list