/* ------------------------------------------------------------------------ */ void decode_start_dyn(void) { n_max = 286; maxmatch = MAXMATCH; init_getbits(); start_c_dyn(); start_p_dyn(); }
/* lh2 */ void decode_start_dyn( /* void */ ) { n_max = 286; maxmatch = MAXMATCH; init_getbits(); init_code_cache(); start_c_dyn(); start_p_dyn(); }
/* ------------------------------------------------------------------------ */ void decode_start_fix(/*void*/) { n_max = 314; maxmatch = 60; init_getbits(); np = 1 << (12 - 6); start_c_dyn(); ready_made(0); lha_make_table(np, pt_len, 8, pt_table); }
/* ------------------------------------------------------------------------ */ void decode_start_st0(void) { n_max = 286; maxmatch = MAXMATCH; init_getbits(); #ifdef SUPPORT_LH7 np = 1 << (MAX_DICBIT - 7); #endif #ifndef SUPPORT_LH7 np = 1 << (MAX_DICBIT - 6); #endif }
int main(int argc, char* argv[]) { char tmpStr[256]; col = 0; verbose_level = 1; sequence_headers = 0; sequence_extensions = 0; user_data_bytes = 0; sequence_scalable_extension_present = 0; printf("bbVINFO - version 1.7, by Brent Beyeler ([email protected])\n"); printf(" speed increases by, Apachez and Christian Vogelgsang\n\n"); if (argc < 2) { printf("\nbbVINFO is an MPEG video stream analyzer\n\n"); printf("Usage: bbVINFO MPEG video filename <verbose level 1..3, default = 1>\n\n"); printf("Examples:\n"); printf(" To list all packet start codes (excluding slice codes) to file test.txt\n"); printf(" bbVINFO test.mpg 1 > test.txt\n\n"); printf(" To list all packets (excluding slice packets) in detail\n"); printf(" bbVINFO test.vob 2\n\n"); printf(" To list all packets (including slice packets) in detail to file test.txt\n"); printf(" bbVINFO test.mpg 3 > test.txt\n\n"); exit (1); } init_getbits(argv[1]); strcpy(tmpStr, argv[1]); // strlwr(tmpStr); if (argc > 2) { sscanf(argv[2], "%d", &verbose_level); if (verbose_level < 1) verbose_level = 1; if (verbose_level > 3) verbose_level = 3; } next_start_code(); if (getbits(8) != SEQUENCE_HEADER_CODE) { printf("\nFile is not an MPEG Video Stream\n"); exit(1); } next_start_code(); if (getbits(8) != EXTENSION_START_CODE) mpeg2 = 0; else mpeg2 = 1; printf("\nFile %s is an MPEG-%d video stream\n", argv[1], mpeg2 + 1); finish_getbits(); init_getbits(argv[1]); next_start_code(); sequence_header(); if (mpeg2) sequence_extension(); do { extension_and_user_data(0); do { if (nextbits(8) == GROUP_START_CODE) { group_of_pictures_header(); extension_and_user_data(1); } picture_header(); if (mpeg2) picture_coding_extension(); extension_and_user_data(2); picture_data(); } while ((nextbits(8) == PICTURE_START_CODE) || (nextbits(8) == GROUP_START_CODE)); if (nextbits(8) != SEQUENCE_END_CODE) { sequence_header(); if (mpeg2) sequence_extension(); } } while (nextbits(8) != SEQUENCE_END_CODE); zprintf(1, "\nsequence_end_code = 0x000001%02X\n", getbits(8)); finish_getbits(); return (0); }
int main(int argc, char* argv[]) { char tmpStr[256]; col = 0; verbose_level = 1; syncwords = 0; printf("bbAINFO - version 1.7, by Brent Beyeler ([email protected])\n"); printf(" speed increases by, Apachez and Christian Vogelgsang\n\n"); if (argc < 2) { printf("\nbbAINFO is an MPEG audio stream analyzer\n"); printf("All it realy does is list the sync word headers\n\n"); printf("Usage: bbAINFO MPEG audio filename\n\n"); printf("Examples:\n"); printf(" To list all frames to file test.txt\n"); printf(" bbAINFO test.mpg > test.txt\n\n"); exit (1); } init_getbits(argv[1]); strcpy(tmpStr, argv[1]); // strlwr(tmpStr); if (argc > 2) { sscanf(argv[2], "%d", &verbose_level); if (verbose_level < 1) verbose_level = 1; if (verbose_level > 3) verbose_level = 3; } if (nextbits(12) != SYNCWORD) { printf("\nFile is not an MPEG Audio Stream\n"); exit(1); } do { header(); error_check(); audio_data(); ancillary_data(); } while (!end_bs()); printf("\nFound %u sync words\n", syncwords); printf("\nHeader info summary:\n"); switch (layer) { case 0: printf(" layer = reserved\n"); break; case LAYER_1: printf(" layer = 1\n"); break; case LAYER_2: printf(" layer = 2\n"); break; case LAYER_3: printf(" layer = 3\n"); break; } printf(" bitrate = %d Kbps\n", bitrate_index[3 - layer][bit_rate]); printf(" frequency = %.1f kHz\n", frequency[freq]); if (protection) printf(" error protection = disabled\n"); else printf(" error protection = enabled\n"); printf(" private flag = %d\n", private_bit); switch (mode) { case 0: printf(" mode = stereo\n"); break; case 1: printf(" mode = joint_stereo (intensity_stereo and/or ms_stereo)\n"); break; case 2: printf(" mode = dual_channel\n"); break; case 3: printf(" mode = single_channel\n"); } if (layer == LAYER_3) { switch (mode_ext) { case 0: printf(" mode ext = intensity stereo is off, ms stereo is off\n"); break; case 1: printf(" mode ext = intensity stereo is on, ms stereo is off\n"); break; case 2: printf(" mode ext = intensity stereo is off, ms stereo is on\n"); break; case 3: printf(" mode ext = intensity stereo is on, ms stereo is on\n"); } } else { if (mode == 1) { switch (mode_ext) { case 0: printf(" mode ext = subbands 4-31 in intensity_stereo, bound==4\n"); break; case 1: printf(" mode ext = subbands 8-31 in intensity_stereo, bound==8\n"); break; case 2: printf(" mode ext = subbands 12-31 in intensity_stereo, bound==12\n"); break; case 3: printf(" mode ext = subbands 16-31 in intensity_stereo, bound==16\n"); } } } printf(" copyright flag = %d\n", copyright); printf(" original flag = %d\n", original); switch (emphasis) { case 0: printf(" emphasis = none\n"); break; case 1: printf(" emphasis = 50/15 microsec. emphasis\n"); break; case 2: printf(" emphasis = reserved\n"); break; case 3: printf(" emphasis = CCITT J.17\n"); } finish_getbits(); return (0); }
/* lzs */ void decode_start_lzs( /*void*/ ) { init_getbits(); init_code_cache(); }