{69,87,104,121,139,174,208,243,278,348,417,487,557,696,835,975,1114,
1253,1393,0,0,0,0,0,0,0,0,0,0,0,0,0},
{96,120,144,168,192,240,288,336,384,480,576,672,768,960,1152,1344,
- 1536,1728,1920,0,0,0,0,0,0,0,0,0,0,0,0,0}};
+ 1536,1728,1920,0,0,0,0,0,0,0,0,0,0,0,0,0}};
#if 0
-static void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
+static void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
void (*pes_write)(u8 *buf, int count, void *data),
void *priv)
{
u8 pct;
if (pr) printk( "Pic header: ");
- pic->temporal_reference[field] = (( headr[0] << 2 ) |
+ pic->temporal_reference[field] = (( headr[0] << 2 ) |
(headr[1] & 0x03) )& 0x03ff;
if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
}
- pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) |
+ pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) |
( (headr[3] & 0x1F) << 11) ) & 0xffff;
if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
- pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
+ pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
((headr[4] & 0x80) >> 3);
if ( pct == B_FRAME ){
pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
}
- if (pr) printk( " pic head param: 0x%x",
+ if (pr) printk( " pic head param: 0x%x",
pic->picture_header_parameter);
return pct;
-}
+}
#endif
#if 0
/* needs 4 byte input */
static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
{
- if (pr) printk("GOP header: ");
+ if (pr) printk("GOP header: ");
- pic->time_code = (( headr[0] << 17 ) | ( headr[1] << 9) |
+ pic->time_code = (( headr[0] << 17 ) | ( headr[1] << 9) |
( headr[2] << 1 ) | (headr[3] &0x01)) & 0x1ffffff;
if (pr) printk(" time: %d:%d.%d ", (headr[0]>>2)& 0x1F,
} else {
pic->closed_gop = 0;
}
- if (pr) printk("closed: %d", pic->closed_gop);
+ if (pr) printk("closed: %d", pic->closed_gop);
if ( ( headr[3] & 0x20 ) != 0 ){
pic->broken_link = 1;
} else {
pic->broken_link = 0;
}
- if (pr) printk(" broken: %d\n", pic->broken_link);
+ if (pr) printk(" broken: %d\n", pic->broken_link);
return 0;
}
vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
vi->vertical_size = ((headr[1] &0x0F) << 8) | (headr[2]);
-
+
sw = (int)((headr[3]&0xF0) >> 4) ;
switch( sw ){
case 1:
if (pr)
printk("Videostream: ASPECT: 1:1");
- vi->aspect_ratio = 100;
+ vi->aspect_ratio = 100;
break;
case 2:
if (pr)
printk("Videostream: ASPECT: 4:3");
- vi->aspect_ratio = 133;
+ vi->aspect_ratio = 133;
break;
case 3:
if (pr)
printk("Videostream: ASPECT: 16:9");
- vi->aspect_ratio = 177;
+ vi->aspect_ratio = 177;
break;
case 4:
if (pr)
printk("Videostream: ASPECT: 2.21:1");
- vi->aspect_ratio = 221;
+ vi->aspect_ratio = 221;
break;
case 5 ... 15:
if (pr)
printk("Videostream: ASPECT: reserved");
- vi->aspect_ratio = 0;
+ vi->aspect_ratio = 0;
break;
default:
- vi->aspect_ratio = 0;
+ vi->aspect_ratio = 0;
return -1;
}
}
vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
-
+
vi->vbv_buffer_size
= (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
else {
c++;
}
- }
+ }
if (!found) return -1;
if (ai->frequency == 3)
printk(" Freq: reserved\n");
else
- printk(" Freq: %d kHz\n",ai->frequency);
-
+ printk(" Freq: %d kHz\n",ai->frequency);
+
}
ai->off = c;
return 0;
int c = 0;
u8 frame = 0;
int fr = 0;
-
+
while ( !found && c < count){
u8 *b = mbuf+c;
else {
c++;
}
- }
+ }
if (!found) return -1;
if (pr)
int skip = 0;
static const int mpeg1_skip_table[16] = {
- 1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff,
+ 1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff,
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
};
pic->picture_display_extension_flag[0] = 0;
pic->picture_display_extension_flag[1] = 0;
- pic->sequence_header_flag = 0;
- pic->gop_flag = 0;
- pic->sequence_end_flag = 0;
+ pic->sequence_header_flag = 0;
+ pic->gop_flag = 0;
+ pic->sequence_end_flag = 0;
}
#endif
}
#endif
-void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
+void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
dvb_filter_pes2ts_cb_t *cb, void *priv)
{
unsigned char *buf=p2ts->buf;
{
unsigned char *buf=p2ts->buf;
int ret=0, rest;
-
+
//len=6+((pes[4]<<8)|pes[5]);
if (payload_start)
- buf[1]|=0x40;
+ buf[1]|=0x40;
else
buf[1]&=~0x40;
while (len>=184) {
return p2ts->cb(p2ts->priv, buf);
}
EXPORT_SYMBOL(dvb_filter_pes2ts);
-