1 /* 2 * Copyright (c) 1998-2001 Katsushi Kobayashi and Hidetoshi Shimokawa 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software 14 * must display the acknowledgement as bellow: 15 * 16 * This product includes software developed by K. Kobayashi and H. Shimokawa 17 * 18 * 4. The name of the author may not be used to endorse or promote products 19 * derived from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 * 33 * $FreeBSD$ 34 * 35 */ 36 struct ciphdr { 37 u_int8_t src:6, 38 form0:1, /* 0 */ 39 eoh0:1; /* 0 */ 40 u_int8_t len; 41 u_int8_t :2, 42 sph:1, 43 qpc:3, 44 fn:2; 45 u_int8_t dbc; 46 u_int8_t fmt:6, 47 #define CIP_FMT_DVCR 0 48 #define CIP_FMT_MPEG (1<<5) 49 form1:1, /* 0 */ 50 eoh1:1; /* 1 */ 51 union { 52 struct { 53 u_int8_t :2, 54 stype:5, 55 #define CIP_STYPE_SD 0 56 #define CIP_STYPE_SDL 1 57 #define CIP_STYPE_HD 2 58 fs:1; /* 50/60 field system 59 NTSC/PAL */ 60 u_int16_t cyc:16; /* take care of byte order! */ 61 } __attribute__ ((packed)) dv; 62 u_int8_t bytes[3]; 63 } fdf; 64 65 }; 66 struct dvdbc{ 67 u_int8_t arb:4, /* Arbitrary bit */ 68 :1, /* Reserved */ 69 sct:3; /* Section type */ 70 #define DV_SCT_HEADER 0 71 #define DV_SCT_SUBCODE 1 72 #define DV_SCT_VAUX 2 73 #define DV_SCT_AUDIO 3 74 #define DV_SCT_VIDEO 4 75 u_int8_t :3, 76 fsc:1, /* ID of a DIF block in each channel */ 77 dseq:4; /* DIF sequence number */ 78 u_int8_t dbn; /* DIF block number */ 79 u_int8_t payload[77]; 80 #define DV_DSF_12 0x80 /* PAL: payload[0] in Header DIF */ 81 }; 82