Revision 5199de4e

View differences:

Chunker/chunker.c
10 10
static double ftimes[N];
11 11
static uint8_t ftypes[N];
12 12

  
13
void print_chunk(int chunk_id, int *chunk_frame, int chunk_dimension, double min_time, double max_time, int chunk_size, int chunk_prio)
14
{
15
  int j;
16
    
17
  printf("%d\t%f\t%f\t%d\t1\t%d :\t", chunk_id, min_time, max_time, chunk_size, chunk_prio);
18
  for (j = 0; j < chunk_dimension; j++) {
19
    printf("%d ", chunk_frame[j]);
20
  }
21
  printf("\n");
22
}
23

  
13 24
void chunkise_ipb(int n)
14 25
{
15 26
  int i, chunk_id = 0;
......
19 30
  double p_max_time = 0, b_max_time = 0;
20 31

  
21 32
  for (i = 0; i < n; i++) {
22
    int j;
23 33
    int b_chunk_frame[50], p_chunk_frame[50];
24 34

  
25 35
    switch (ftypes[i]) {
26 36
      case 1:
27 37
        /* I Type */
28 38
        if (p_chunk_dimension) {
29
          printf("%d\t%f\t%f\t%d\t1\t2 :\t", chunk_id++, p_min_time, p_max_time, p_chunk_size);
30
          for (j = 0; j < p_chunk_dimension; j++) {
31
            printf("%d ", p_chunk_frame[j]);
32
          }
33
          printf("\n");
39
          print_chunk(chunk_id++, p_chunk_frame, p_chunk_dimension, p_min_time, p_max_time, p_chunk_size, 2);
34 40
        }
35 41
        if (b_chunk_dimension) {
36
          printf("%d\t%f\t%f\t%d\t1\t1 :\t", chunk_id++, b_min_time, b_max_time, b_chunk_size);
37
          for (j = 0; j < b_chunk_dimension; j++) {
38
            printf("%d ", b_chunk_frame[j]);
39
          }
40
          printf("\n");
42
          print_chunk(chunk_id++, b_chunk_frame, b_chunk_dimension, b_min_time, b_max_time, b_chunk_size, 1);
41 43
        }
42 44
        p_chunk_size = b_chunk_size = 0;
43 45
        p_chunk_dimension = b_chunk_dimension = 0;
......
74 76
  double max_time = 0;
75 77

  
76 78
  for (i = 0; i < n; i++) {
77
    int j;
78 79
    int chunk_frame[150];
79 80

  
80 81
    if (ftypes[i] == 1) {
81 82
      /* I Type */
82 83
      if (chunk_dimension) {
83
        printf("%d\t%f\t%f\t%d\t1\t1 :\t", chunk_id++, min_time, max_time, chunk_size);
84
        for (j = 0; j < chunk_dimension; j++) {
85
          printf("%d ", chunk_frame[j]);
86
        }
87
        printf("\n");
84
        print_chunk(chunk_id++, chunk_frame, chunk_dimension, min_time, max_time, chunk_size, 1);
88 85
      }
89 86
      chunk_size = 0;
90 87
      chunk_dimension = 0;

Also available in: Unified diff