Changeset 3762 for liboggz/trunk/src/liboggz/dirac.c
- Timestamp:
- 2008-11-04 11:22:22 (2 months ago)
- Files:
-
- liboggz/trunk/src/liboggz/dirac.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
liboggz/trunk/src/liboggz/dirac.c
r3665 r3762 116 116 {1,1}, /* this first value is never used */ 117 117 {24000,1001}, {24,1}, {25,1}, {30000,1001}, {30,1}, 118 {50,1}, {60000,1001}, {60,1}, {15000,1001}, {25,2} ,118 {50,1}, {60000,1001}, {60,1}, {15000,1001}, {25,2} 119 119 }; 120 120 121 121 static const ogg_uint32_t dirac_vidfmt_frate[] = { /* table C.1 */ 122 1, 9, 10, 9, 10, 9, 10, 4, 3, 7, 6, 4, 3, 7, 6, 2, 2, 7, 6, 7, 6, 122 1, 9, 10, 9, 10, 9, 10, 4, 3, 7, 6, 4, 3, 7, 6, 2, 2, 7, 6, 7, 6 123 }; 124 125 static const int dirac_source_sampling[] = { /* extracted from table C.1 */ 126 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 127 }; 128 static const int dirac_top_field_first[] = { /* from table C.1 */ 129 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 123 130 }; 124 131 … … 151 158 info->chroma_format = dirac_uint( &bs ); /* chroma_format */ 152 159 } 153 if (dirac_bool( &bs )) { 154 info->interlaced = 0; 155 if (dirac_bool( &bs )) { /* interlaced */ 156 info->interlaced = 1; 157 info->top_field_first = dirac_bool( &bs ); /* top_field_first */ 160 161 if (dirac_bool( &bs )) { /* custom_scan_format_flag */ 162 int scan_format = dirac_uint( &bs ); /* scan_format */ 163 if (scan_format < 2) { 164 info->interlaced = scan_format; 165 } else { /* other scan_format values are reserved */ 166 info->interlaced = 0; 158 167 } 168 } else { /* no custom scan_format, use the preset value */ 169 info->interlaced = dirac_source_sampling[video_format]; 159 170 } 171 /* field order is set by video_format and cannot be custom */ 172 info->top_field_first = dirac_top_field_first[video_format]; 160 173 161 174 info->fps_numerator = dirac_frate_tbl[dirac_vidfmt_frate[video_format]].fps_numerator;