public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <daniel-gl@gmx.net>
To: Michel Bardiaux <mbardiaux@mediaxim.be>
Cc: video4linux-list@redhat.com
Subject: Re: Grabbing 4:3 and 16:9
Date: Tue, 26 Feb 2008 19:32:03 +0100	[thread overview]
Message-ID: <20080226183202.GA787@daniel.bse> (raw)
In-Reply-To: <47C4488A.8080107@mediaxim.be>

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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  parent reply	other threads:[~2008-02-26 18:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 11:19 Grabbing 4:3 and 16:9 Michel Bardiaux
2008-02-26 13:02 ` Daniel Glöckner
2008-02-26 13:38   ` Alan Cox
2008-02-26 16:40     ` Michel Bardiaux
2008-02-26 17:02       ` Alan Cox
2008-02-26 17:12         ` Michel Bardiaux
2008-02-26 17:17           ` Michel Bardiaux
2008-02-26 17:24           ` Alan Cox
2008-02-26 18:32           ` Daniel Glöckner [this message]
2008-02-26 16:55   ` Michel Bardiaux
2008-02-26 17:15     ` Hans Verkuil
2008-02-28 14:12       ` Michel Bardiaux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080226183202.GA787@daniel.bse \
    --to=daniel-gl@gmx.net \
    --cc=mbardiaux@mediaxim.be \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox