Mercurial > libavcodec.hg
comparison dvdata.h @ 7616:685ef77c9fe5 libavcodec
Making block size in bits variable and dependent on the DV spec
| author | romansh |
|---|---|
| date | Tue, 19 Aug 2008 16:02:43 +0000 |
| parents | 290fd3ae1219 |
| children | f0f8bb920b24 |
comparison
equal
deleted
inserted
replaced
| 7615:290fd3ae1219 | 7616:685ef77c9fe5 |
|---|---|
| 48 int width; /* picture width in pixels */ | 48 int width; /* picture width in pixels */ |
| 49 AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */ | 49 AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */ |
| 50 const uint16_t *video_place; /* positions of all DV macro blocks */ | 50 const uint16_t *video_place; /* positions of all DV macro blocks */ |
| 51 enum PixelFormat pix_fmt; /* picture pixel format */ | 51 enum PixelFormat pix_fmt; /* picture pixel format */ |
| 52 int bpm; /* blocks per macroblock */ | 52 int bpm; /* blocks per macroblock */ |
| 53 const uint8_t *block_sizes; /* AC block sizes, in bits */ | |
| 53 int audio_stride; /* size of audio_shuffle table */ | 54 int audio_stride; /* size of audio_shuffle table */ |
| 54 int audio_min_samples[3];/* min ammount of audio samples */ | 55 int audio_min_samples[3];/* min ammount of audio samples */ |
| 55 /* for 48Khz, 44.1Khz and 32Khz */ | 56 /* for 48Khz, 44.1Khz and 32Khz */ |
| 56 int audio_samples_dist[5];/* how many samples are supposed to be */ | 57 int audio_samples_dist[5];/* how many samples are supposed to be */ |
| 57 /* in each frame in a 5 frames window */ | 58 /* in each frame in a 5 frames window */ |
| 2519 | 2520 |
| 2520 static const av_unused int dv_audio_frequency[3] = { | 2521 static const av_unused int dv_audio_frequency[3] = { |
| 2521 48000, 44100, 32000, | 2522 48000, 44100, 32000, |
| 2522 }; | 2523 }; |
| 2523 | 2524 |
| 2525 /* macroblock bit budgets */ | |
| 2526 static const uint8_t block_sizes_dv2550[8] = { | |
| 2527 112, 112, 112, 112, 80, 80, 0, 0, | |
| 2528 }; | |
| 2529 | |
| 2530 static const uint8_t block_sizes_dv100[8] = { | |
| 2531 80, 80, 80, 80, 80, 80, 64, 64, | |
| 2532 }; | |
| 2533 | |
| 2524 static const DVprofile dv_profiles[] = { | 2534 static const DVprofile dv_profiles[] = { |
| 2525 { .dsf = 0, | 2535 { .dsf = 0, |
| 2526 .frame_size = 120000, /* IEC 61834, SMPTE-314M - 525/60 (NTSC) */ | 2536 .frame_size = 120000, /* IEC 61834, SMPTE-314M - 525/60 (NTSC) */ |
| 2527 .difseg_size = 10, | 2537 .difseg_size = 10, |
| 2528 .n_difchan = 1, | 2538 .n_difchan = 1, |
| 2533 .width = 720, | 2543 .width = 720, |
| 2534 .sar = {{10, 11}, {40, 33}}, | 2544 .sar = {{10, 11}, {40, 33}}, |
| 2535 .video_place = dv_place_411, | 2545 .video_place = dv_place_411, |
| 2536 .pix_fmt = PIX_FMT_YUV411P, | 2546 .pix_fmt = PIX_FMT_YUV411P, |
| 2537 .bpm = 6, | 2547 .bpm = 6, |
| 2548 .block_sizes = block_sizes_dv2550, | |
| 2538 .audio_stride = 90, | 2549 .audio_stride = 90, |
| 2539 .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */ | 2550 .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */ |
| 2540 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */ | 2551 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */ |
| 2541 .audio_shuffle = dv_audio_shuffle525, | 2552 .audio_shuffle = dv_audio_shuffle525, |
| 2542 }, | 2553 }, |
| 2551 .width = 720, | 2562 .width = 720, |
| 2552 .sar = {{59, 54}, {118, 81}}, | 2563 .sar = {{59, 54}, {118, 81}}, |
| 2553 .video_place = dv_place_420, | 2564 .video_place = dv_place_420, |
| 2554 .pix_fmt = PIX_FMT_YUV420P, | 2565 .pix_fmt = PIX_FMT_YUV420P, |
| 2555 .bpm = 6, | 2566 .bpm = 6, |
| 2567 .block_sizes = block_sizes_dv2550, | |
| 2556 .audio_stride = 108, | 2568 .audio_stride = 108, |
| 2557 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ | 2569 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ |
| 2558 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, | 2570 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, |
| 2559 .audio_shuffle = dv_audio_shuffle625, | 2571 .audio_shuffle = dv_audio_shuffle625, |
| 2560 }, | 2572 }, |
| 2569 .width = 720, | 2581 .width = 720, |
| 2570 .sar = {{59, 54}, {118, 81}}, | 2582 .sar = {{59, 54}, {118, 81}}, |
| 2571 .video_place = dv_place_411P, | 2583 .video_place = dv_place_411P, |
| 2572 .pix_fmt = PIX_FMT_YUV411P, | 2584 .pix_fmt = PIX_FMT_YUV411P, |
| 2573 .bpm = 6, | 2585 .bpm = 6, |
| 2586 .block_sizes = block_sizes_dv2550, | |
| 2574 .audio_stride = 108, | 2587 .audio_stride = 108, |
| 2575 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ | 2588 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ |
| 2576 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, | 2589 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, |
| 2577 .audio_shuffle = dv_audio_shuffle625, | 2590 .audio_shuffle = dv_audio_shuffle625, |
| 2578 }, | 2591 }, |
| 2587 .width = 720, | 2600 .width = 720, |
| 2588 .sar = {{10, 11}, {40, 33}}, | 2601 .sar = {{10, 11}, {40, 33}}, |
| 2589 .video_place = dv_place_422_525, | 2602 .video_place = dv_place_422_525, |
| 2590 .pix_fmt = PIX_FMT_YUV422P, | 2603 .pix_fmt = PIX_FMT_YUV422P, |
| 2591 .bpm = 6, | 2604 .bpm = 6, |
| 2605 .block_sizes = block_sizes_dv2550, | |
| 2592 .audio_stride = 90, | 2606 .audio_stride = 90, |
| 2593 .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */ | 2607 .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */ |
| 2594 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */ | 2608 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */ |
| 2595 .audio_shuffle = dv_audio_shuffle525, | 2609 .audio_shuffle = dv_audio_shuffle525, |
| 2596 }, | 2610 }, |
| 2605 .width = 720, | 2619 .width = 720, |
| 2606 .sar = {{59, 54}, {118, 81}}, | 2620 .sar = {{59, 54}, {118, 81}}, |
| 2607 .video_place = dv_place_422_625, | 2621 .video_place = dv_place_422_625, |
| 2608 .pix_fmt = PIX_FMT_YUV422P, | 2622 .pix_fmt = PIX_FMT_YUV422P, |
| 2609 .bpm = 6, | 2623 .bpm = 6, |
| 2624 .block_sizes = block_sizes_dv2550, | |
| 2610 .audio_stride = 108, | 2625 .audio_stride = 108, |
| 2611 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ | 2626 .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */ |
| 2612 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, | 2627 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 }, |
| 2613 .audio_shuffle = dv_audio_shuffle625, | 2628 .audio_shuffle = dv_audio_shuffle625, |
| 2614 } | 2629 } |
