aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dvb_filter.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-12-12 03:37:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-12 11:57:44 -0500
commitafd1a0c9ac281eed3b22b293ccd92af7b0d60889 (patch)
tree686c03cf1a1a2efb1fba6dc6e682fbb48edc7c58 /drivers/media/dvb/dvb-core/dvb_filter.c
parent808824b5f73e361503420ee318ca9689781da034 (diff)
[PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3
Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvb_filter.c')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_filter.c332
1 files changed, 166 insertions, 166 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_filter.c b/drivers/media/dvb/dvb-core/dvb_filter.c
index bd514390608..c49fd0bd718 100644
--- a/drivers/media/dvb/dvb-core/dvb_filter.c
+++ b/drivers/media/dvb/dvb-core/dvb_filter.c
@@ -72,12 +72,12 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
72 u8 pct; 72 u8 pct;
73 73
74 if (pr) printk( "Pic header: "); 74 if (pr) printk( "Pic header: ");
75 pic->temporal_reference[field] = (( headr[0] << 2 ) | 75 pic->temporal_reference[field] = (( headr[0] << 2 ) |
76 (headr[1] & 0x03) )& 0x03ff; 76 (headr[1] & 0x03) )& 0x03ff;
77 if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]); 77 if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
78 78
79 pct = ( headr[1] >> 2 ) & 0x07; 79 pct = ( headr[1] >> 2 ) & 0x07;
80 pic->picture_coding_type[field] = pct; 80 pic->picture_coding_type[field] = pct;
81 if (pr) { 81 if (pr) {
82 switch(pct){ 82 switch(pct){
83 case I_FRAME: 83 case I_FRAME:
@@ -93,17 +93,17 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
93 } 93 }
94 94
95 95
96 pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) | 96 pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) |
97 ( (headr[3] & 0x1F) << 11) ) & 0xffff; 97 ( (headr[3] & 0x1F) << 11) ) & 0xffff;
98 98
99 if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay); 99 if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
100 100
101 pic->picture_header_parameter = ( headr[3] & 0xe0 ) | 101 pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
102 ((headr[4] & 0x80) >> 3); 102 ((headr[4] & 0x80) >> 3);
103 103
104 if ( pct == B_FRAME ){ 104 if ( pct == B_FRAME ){
105 pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f; 105 pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
106 } 106 }
107 if (pr) printk( " pic head param: 0x%x", 107 if (pr) printk( " pic head param: 0x%x",
108 pic->picture_header_parameter); 108 pic->picture_header_parameter);
109 109
@@ -124,18 +124,18 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
124 ((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F), 124 ((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
125 ((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F)); 125 ((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
126 126
127 if ( ( headr[3] & 0x40 ) != 0 ){ 127 if ( ( headr[3] & 0x40 ) != 0 ){
128 pic->closed_gop = 1; 128 pic->closed_gop = 1;
129 } else { 129 } else {
130 pic->closed_gop = 0; 130 pic->closed_gop = 0;
131 } 131 }
132 if (pr) printk("closed: %d", pic->closed_gop); 132 if (pr) printk("closed: %d", pic->closed_gop);
133 133
134 if ( ( headr[3] & 0x20 ) != 0 ){ 134 if ( ( headr[3] & 0x20 ) != 0 ){
135 pic->broken_link = 1; 135 pic->broken_link = 1;
136 } else { 136 } else {
137 pic->broken_link = 0; 137 pic->broken_link = 0;
138 } 138 }
139 if (pr) printk(" broken: %d\n", pic->broken_link); 139 if (pr) printk(" broken: %d\n", pic->broken_link);
140 140
141 return 0; 141 return 0;
@@ -146,7 +146,7 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
146/* needs 8 byte input */ 146/* needs 8 byte input */
147static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr) 147static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
148{ 148{
149 int sw; 149 int sw;
150 int form = -1; 150 int form = -1;
151 151
152 if (pr) printk("Reading sequence header\n"); 152 if (pr) printk("Reading sequence header\n");
@@ -154,9 +154,9 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
154 vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4); 154 vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
155 vi->vertical_size = ((headr[1] &0x0F) << 8) | (headr[2]); 155 vi->vertical_size = ((headr[1] &0x0F) << 8) | (headr[2]);
156 156
157 sw = (int)((headr[3]&0xF0) >> 4) ; 157 sw = (int)((headr[3]&0xF0) >> 4) ;
158 158
159 switch( sw ){ 159 switch( sw ){
160 case 1: 160 case 1:
161 if (pr) 161 if (pr)
162 printk("Videostream: ASPECT: 1:1"); 162 printk("Videostream: ASPECT: 1:1");
@@ -165,84 +165,84 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
165 case 2: 165 case 2:
166 if (pr) 166 if (pr)
167 printk("Videostream: ASPECT: 4:3"); 167 printk("Videostream: ASPECT: 4:3");
168 vi->aspect_ratio = 133; 168 vi->aspect_ratio = 133;
169 break; 169 break;
170 case 3: 170 case 3:
171 if (pr) 171 if (pr)
172 printk("Videostream: ASPECT: 16:9"); 172 printk("Videostream: ASPECT: 16:9");
173 vi->aspect_ratio = 177; 173 vi->aspect_ratio = 177;
174 break; 174 break;
175 case 4: 175 case 4:
176 if (pr) 176 if (pr)
177 printk("Videostream: ASPECT: 2.21:1"); 177 printk("Videostream: ASPECT: 2.21:1");
178 vi->aspect_ratio = 221; 178 vi->aspect_ratio = 221;
179 break; 179 break;
180 180
181 case 5 ... 15: 181 case 5 ... 15:
182 if (pr) 182 if (pr)
183 printk("Videostream: ASPECT: reserved"); 183 printk("Videostream: ASPECT: reserved");
184 vi->aspect_ratio = 0; 184 vi->aspect_ratio = 0;
185 break; 185 break;
186 186
187 default: 187 default:
188 vi->aspect_ratio = 0; 188 vi->aspect_ratio = 0;
189 return -1; 189 return -1;
190 } 190 }
191 191
192 if (pr) 192 if (pr)
193 printk(" Size = %dx%d",vi->horizontal_size,vi->vertical_size); 193 printk(" Size = %dx%d",vi->horizontal_size,vi->vertical_size);
194 194
195 sw = (int)(headr[3]&0x0F); 195 sw = (int)(headr[3]&0x0F);
196 196
197 switch ( sw ) { 197 switch ( sw ) {
198 case 1: 198 case 1:
199 if (pr) 199 if (pr)
200 printk(" FRate: 23.976 fps"); 200 printk(" FRate: 23.976 fps");
201 vi->framerate = 23976; 201 vi->framerate = 23976;
202 form = -1; 202 form = -1;
203 break; 203 break;
204 case 2: 204 case 2:
205 if (pr) 205 if (pr)
206 printk(" FRate: 24 fps"); 206 printk(" FRate: 24 fps");
207 vi->framerate = 24000; 207 vi->framerate = 24000;
208 form = -1; 208 form = -1;
209 break; 209 break;
210 case 3: 210 case 3:
211 if (pr) 211 if (pr)
212 printk(" FRate: 25 fps"); 212 printk(" FRate: 25 fps");
213 vi->framerate = 25000; 213 vi->framerate = 25000;
214 form = VIDEO_MODE_PAL; 214 form = VIDEO_MODE_PAL;
215 break; 215 break;
216 case 4: 216 case 4:
217 if (pr) 217 if (pr)
218 printk(" FRate: 29.97 fps"); 218 printk(" FRate: 29.97 fps");
219 vi->framerate = 29970; 219 vi->framerate = 29970;
220 form = VIDEO_MODE_NTSC; 220 form = VIDEO_MODE_NTSC;
221 break; 221 break;
222 case 5: 222 case 5:
223 if (pr) 223 if (pr)
224 printk(" FRate: 30 fps"); 224 printk(" FRate: 30 fps");
225 vi->framerate = 30000; 225 vi->framerate = 30000;
226 form = VIDEO_MODE_NTSC; 226 form = VIDEO_MODE_NTSC;
227 break; 227 break;
228 case 6: 228 case 6:
229 if (pr) 229 if (pr)
230 printk(" FRate: 50 fps"); 230 printk(" FRate: 50 fps");
231 vi->framerate = 50000; 231 vi->framerate = 50000;
232 form = VIDEO_MODE_PAL; 232 form = VIDEO_MODE_PAL;
233 break; 233 break;
234 case 7: 234 case 7:
235 if (pr) 235 if (pr)
236 printk(" FRate: 60 fps"); 236 printk(" FRate: 60 fps");
237 vi->framerate = 60000; 237 vi->framerate = 60000;
238 form = VIDEO_MODE_NTSC; 238 form = VIDEO_MODE_NTSC;
239 break; 239 break;
240 } 240 }
241 241
242 vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03); 242 vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
243 243
244 vi->vbv_buffer_size 244 vi->vbv_buffer_size
245 = (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5); 245 = (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
246 246
247 if (pr){ 247 if (pr){
248 printk(" BRate: %d Mbit/s",4*(vi->bit_rate)/10000); 248 printk(" BRate: %d Mbit/s",4*(vi->bit_rate)/10000);
@@ -250,7 +250,7 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
250 printk("\n"); 250 printk("\n");
251 } 251 }
252 252
253 vi->video_format = form; 253 vi->video_format = form;
254 254
255 return 0; 255 return 0;
256} 256}
@@ -308,7 +308,7 @@ static int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr)
308 if (!found) return -1; 308 if (!found) return -1;
309 309
310 if (c+3 >= count) return -1; 310 if (c+3 >= count) return -1;
311 headr = mbuf+c; 311 headr = mbuf+c;
312 312
313 ai->layer = (headr[1] & 0x06) >> 1; 313 ai->layer = (headr[1] & 0x06) >> 1;
314 314
@@ -368,7 +368,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
368 if (c+5 >= count) return -1; 368 if (c+5 >= count) return -1;
369 369
370 ai->layer = 0; // 0 for AC3 370 ai->layer = 0; // 0 for AC3
371 headr = mbuf+c+2; 371 headr = mbuf+c+2;
372 372
373 frame = (headr[2]&0x3f); 373 frame = (headr[2]&0x3f);
374 ai->bit_rate = ac3_bitrates[frame >> 1]*1000; 374 ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
@@ -396,159 +396,159 @@ EXPORT_SYMBOL(dvb_filter_get_ac3info);
396#if 0 396#if 0
397static u8 *skip_pes_header(u8 **bufp) 397static u8 *skip_pes_header(u8 **bufp)
398{ 398{
399 u8 *inbuf = *bufp; 399 u8 *inbuf = *bufp;
400 u8 *buf = inbuf; 400 u8 *buf = inbuf;
401 u8 *pts = NULL; 401 u8 *pts = NULL;
402 int skip = 0; 402 int skip = 0;
403 403
404 static const int mpeg1_skip_table[16] = { 404 static const int mpeg1_skip_table[16] = {
405 1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff, 405 1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff,
406 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff 406 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
407 }; 407 };
408 408
409 409
410 if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */ 410 if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
411 if (buf[7] & PTS_ONLY) 411 if (buf[7] & PTS_ONLY)
412 pts = buf+9; 412 pts = buf+9;
413 else pts = NULL; 413 else pts = NULL;
414 buf = inbuf + 9 + inbuf[8]; 414 buf = inbuf + 9 + inbuf[8];
415 } else { /* mpeg1 */ 415 } else { /* mpeg1 */
416 for (buf = inbuf + 6; *buf == 0xff; buf++) 416 for (buf = inbuf + 6; *buf == 0xff; buf++)
417 if (buf == inbuf + 6 + 16) { 417 if (buf == inbuf + 6 + 16) {
418 break; 418 break;
419 } 419 }
420 if ((*buf & 0xc0) == 0x40) 420 if ((*buf & 0xc0) == 0x40)
421 buf += 2; 421 buf += 2;
422 skip = mpeg1_skip_table [*buf >> 4]; 422 skip = mpeg1_skip_table [*buf >> 4];
423 if (skip == 5 || skip == 10) pts = buf; 423 if (skip == 5 || skip == 10) pts = buf;
424 else pts = NULL; 424 else pts = NULL;
425 425
426 buf += mpeg1_skip_table [*buf >> 4]; 426 buf += mpeg1_skip_table [*buf >> 4];
427 } 427 }
428 428
429 *bufp = buf; 429 *bufp = buf;
430 return pts; 430 return pts;
431} 431}
432#endif 432#endif
433 433
434#if 0 434#if 0
435static void initialize_quant_matrix( u32 *matrix ) 435static void initialize_quant_matrix( u32 *matrix )
436{ 436{
437 int i; 437 int i;
438 438
439 matrix[0] = 0x08101013; 439 matrix[0] = 0x08101013;
440 matrix[1] = 0x10131616; 440 matrix[1] = 0x10131616;
441 matrix[2] = 0x16161616; 441 matrix[2] = 0x16161616;
442 matrix[3] = 0x1a181a1b; 442 matrix[3] = 0x1a181a1b;
443 matrix[4] = 0x1b1b1a1a; 443 matrix[4] = 0x1b1b1a1a;
444 matrix[5] = 0x1a1a1b1b; 444 matrix[5] = 0x1a1a1b1b;
445 matrix[6] = 0x1b1d1d1d; 445 matrix[6] = 0x1b1d1d1d;
446 matrix[7] = 0x2222221d; 446 matrix[7] = 0x2222221d;
447 matrix[8] = 0x1d1d1b1b; 447 matrix[8] = 0x1d1d1b1b;
448 matrix[9] = 0x1d1d2020; 448 matrix[9] = 0x1d1d2020;
449 matrix[10] = 0x22222526; 449 matrix[10] = 0x22222526;
450 matrix[11] = 0x25232322; 450 matrix[11] = 0x25232322;
451 matrix[12] = 0x23262628; 451 matrix[12] = 0x23262628;
452 matrix[13] = 0x28283030; 452 matrix[13] = 0x28283030;
453 matrix[14] = 0x2e2e3838; 453 matrix[14] = 0x2e2e3838;
454 matrix[15] = 0x3a454553; 454 matrix[15] = 0x3a454553;
455 455
456 for ( i = 16 ; i < 32 ; i++ ) 456 for ( i = 16 ; i < 32 ; i++ )
457 matrix[i] = 0x10101010; 457 matrix[i] = 0x10101010;
458} 458}
459#endif 459#endif
460 460
461#if 0 461#if 0
462static void initialize_mpg_picture(struct mpg_picture *pic) 462static void initialize_mpg_picture(struct mpg_picture *pic)
463{ 463{
464 int i; 464 int i;
465 465
466 /* set MPEG1 */ 466 /* set MPEG1 */
467 pic->mpeg1_flag = 1; 467 pic->mpeg1_flag = 1;
468 pic->profile_and_level = 0x4A ; /* MP@LL */ 468 pic->profile_and_level = 0x4A ; /* MP@LL */
469 pic->progressive_sequence = 1; 469 pic->progressive_sequence = 1;
470 pic->low_delay = 0; 470 pic->low_delay = 0;
471 471
472 pic->sequence_display_extension_flag = 0; 472 pic->sequence_display_extension_flag = 0;
473 for ( i = 0 ; i < 4 ; i++ ){ 473 for ( i = 0 ; i < 4 ; i++ ){
474 pic->frame_centre_horizontal_offset[i] = 0; 474 pic->frame_centre_horizontal_offset[i] = 0;
475 pic->frame_centre_vertical_offset[i] = 0; 475 pic->frame_centre_vertical_offset[i] = 0;
476 } 476 }
477 pic->last_frame_centre_horizontal_offset = 0; 477 pic->last_frame_centre_horizontal_offset = 0;
478 pic->last_frame_centre_vertical_offset = 0; 478 pic->last_frame_centre_vertical_offset = 0;
479 479
480 pic->picture_display_extension_flag[0] = 0; 480 pic->picture_display_extension_flag[0] = 0;
481 pic->picture_display_extension_flag[1] = 0; 481 pic->picture_display_extension_flag[1] = 0;
482 pic->sequence_header_flag = 0; 482 pic->sequence_header_flag = 0;
483 pic->gop_flag = 0; 483 pic->gop_flag = 0;
484 pic->sequence_end_flag = 0; 484 pic->sequence_end_flag = 0;
485} 485}
486#endif 486#endif
487 487
488#if 0 488#if 0
489static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic ) 489static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
490{ 490{
491 int16_t last_h_offset; 491 int16_t last_h_offset;
492 int16_t last_v_offset; 492 int16_t last_v_offset;
493 493
494 int16_t *p_h_offset; 494 int16_t *p_h_offset;
495 int16_t *p_v_offset; 495 int16_t *p_v_offset;
496 496
497 if ( pic->mpeg1_flag ){ 497 if ( pic->mpeg1_flag ){
498 pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE; 498 pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
499 pic->top_field_first = 0; 499 pic->top_field_first = 0;
500 pic->repeat_first_field = 0; 500 pic->repeat_first_field = 0;
501 pic->progressive_frame = 1; 501 pic->progressive_frame = 1;
502 pic->picture_coding_parameter = 0x000010; 502 pic->picture_coding_parameter = 0x000010;
503 } 503 }
504 504
505 /* Reset flag */ 505 /* Reset flag */
506 pic->picture_display_extension_flag[field_type] = 0; 506 pic->picture_display_extension_flag[field_type] = 0;
507 507
508 last_h_offset = pic->last_frame_centre_horizontal_offset; 508 last_h_offset = pic->last_frame_centre_horizontal_offset;
509 last_v_offset = pic->last_frame_centre_vertical_offset; 509 last_v_offset = pic->last_frame_centre_vertical_offset;
510 if ( field_type == FIRST_FIELD ){ 510 if ( field_type == FIRST_FIELD ){
511 p_h_offset = pic->frame_centre_horizontal_offset; 511 p_h_offset = pic->frame_centre_horizontal_offset;
512 p_v_offset = pic->frame_centre_vertical_offset; 512 p_v_offset = pic->frame_centre_vertical_offset;
513 *p_h_offset = last_h_offset; 513 *p_h_offset = last_h_offset;
514 *(p_h_offset + 1) = last_h_offset; 514 *(p_h_offset + 1) = last_h_offset;
515 *(p_h_offset + 2) = last_h_offset; 515 *(p_h_offset + 2) = last_h_offset;
516 *p_v_offset = last_v_offset; 516 *p_v_offset = last_v_offset;
517 *(p_v_offset + 1) = last_v_offset; 517 *(p_v_offset + 1) = last_v_offset;
518 *(p_v_offset + 2) = last_v_offset; 518 *(p_v_offset + 2) = last_v_offset;
519 } else { 519 } else {
520 pic->frame_centre_horizontal_offset[3] = last_h_offset; 520 pic->frame_centre_horizontal_offset[3] = last_h_offset;
521 pic->frame_centre_vertical_offset[3] = last_v_offset; 521 pic->frame_centre_vertical_offset[3] = last_v_offset;
522 } 522 }
523} 523}
524#endif 524#endif
525 525
526#if 0 526#if 0
527static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type) 527static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
528{ 528{
529 pic->picture_header = 0; 529 pic->picture_header = 0;
530 pic->sequence_header_data 530 pic->sequence_header_data
531 = ( INIT_HORIZONTAL_SIZE << 20 ) 531 = ( INIT_HORIZONTAL_SIZE << 20 )
532 | ( INIT_VERTICAL_SIZE << 8 ) 532 | ( INIT_VERTICAL_SIZE << 8 )
533 | ( INIT_ASPECT_RATIO << 4 ) 533 | ( INIT_ASPECT_RATIO << 4 )
534 | ( INIT_FRAME_RATE ); 534 | ( INIT_FRAME_RATE );
535 pic->mpeg1_flag = 0; 535 pic->mpeg1_flag = 0;
536 pic->vinfo.horizontal_size 536 pic->vinfo.horizontal_size
537 = INIT_DISP_HORIZONTAL_SIZE; 537 = INIT_DISP_HORIZONTAL_SIZE;
538 pic->vinfo.vertical_size 538 pic->vinfo.vertical_size
539 = INIT_DISP_VERTICAL_SIZE; 539 = INIT_DISP_VERTICAL_SIZE;
540 pic->picture_display_extension_flag[field_type] 540 pic->picture_display_extension_flag[field_type]
541 = 0; 541 = 0;
542 pic->pts_flag[field_type] = 0; 542 pic->pts_flag[field_type] = 0;
543 543
544 pic->sequence_gop_header = 0; 544 pic->sequence_gop_header = 0;
545 pic->picture_header = 0; 545 pic->picture_header = 0;
546 pic->sequence_header_flag = 0; 546 pic->sequence_header_flag = 0;
547 pic->gop_flag = 0; 547 pic->gop_flag = 0;
548 pic->sequence_end_flag = 0; 548 pic->sequence_end_flag = 0;
549 pic->sequence_display_extension_flag = 0; 549 pic->sequence_display_extension_flag = 0;
550 pic->last_frame_centre_horizontal_offset = 0; 550 pic->last_frame_centre_horizontal_offset = 0;
551 pic->last_frame_centre_vertical_offset = 0; 551 pic->last_frame_centre_vertical_offset = 0;
552 pic->channel = chan; 552 pic->channel = chan;
553} 553}
554#endif 554#endif
@@ -588,11 +588,11 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
588 buf[1]&=~0x40; 588 buf[1]&=~0x40;
589 } 589 }
590 if (!len) 590 if (!len)
591 return 0; 591 return 0;
592 buf[3]=0x30|((p2ts->cc++)&0x0f); 592 buf[3]=0x30|((p2ts->cc++)&0x0f);
593 rest=183-len; 593 rest=183-len;
594 if (rest) { 594 if (rest) {
595 buf[5]=0x00; 595 buf[5]=0x00;
596 if (rest-1) 596 if (rest-1)
597 memset(buf+6, 0xff, rest-1); 597 memset(buf+6, 0xff, rest-1);
598 } 598 }