33 static const uint8_t dv_audio_shuffle525[10][9] = {
34 { 0, 30, 60, 20, 50, 80, 10, 40, 70 },
35 { 6, 36, 66, 26, 56, 86, 16, 46, 76 },
36 { 12, 42, 72, 2, 32, 62, 22, 52, 82 },
37 { 18, 48, 78, 8, 38, 68, 28, 58, 88 },
38 { 24, 54, 84, 14, 44, 74, 4, 34, 64 },
40 { 1, 31, 61, 21, 51, 81, 11, 41, 71 },
41 { 7, 37, 67, 27, 57, 87, 17, 47, 77 },
42 { 13, 43, 73, 3, 33, 63, 23, 53, 83 },
43 { 19, 49, 79, 9, 39, 69, 29, 59, 89 },
44 { 25, 55, 85, 15, 45, 75, 5, 35, 65 },
47 static const uint8_t dv_audio_shuffle625[12][9] = {
48 { 0, 36, 72, 26, 62, 98, 16, 52, 88},
49 { 6, 42, 78, 32, 68, 104, 22, 58, 94},
50 { 12, 48, 84, 2, 38, 74, 28, 64, 100},
51 { 18, 54, 90, 8, 44, 80, 34, 70, 106},
52 { 24, 60, 96, 14, 50, 86, 4, 40, 76},
53 { 30, 66, 102, 20, 56, 92, 10, 46, 82},
55 { 1, 37, 73, 27, 63, 99, 17, 53, 89},
56 { 7, 43, 79, 33, 69, 105, 23, 59, 95},
57 { 13, 49, 85, 3, 39, 75, 29, 65, 101},
58 { 19, 55, 91, 9, 45, 81, 35, 71, 107},
59 { 25, 61, 97, 15, 51, 87, 5, 41, 77},
60 { 31, 67, 103, 21, 57, 93, 11, 47, 83},
64 static const uint8_t block_sizes_dv2550[8] = {
65 112, 112, 112, 112, 80, 80, 0, 0,
68 static const uint8_t block_sizes_dv100[8] = {
69 80, 80, 80, 80, 80, 80, 64, 64,
78 .time_base = { 1001, 30000 },
82 .sar = {{8, 9}, {32, 27}},
85 .block_sizes = block_sizes_dv2550,
87 .audio_min_samples = { 1580, 1452, 1053 },
88 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 },
89 .audio_shuffle = dv_audio_shuffle525,
96 .time_base = { 1, 25 },
100 .sar = {{16, 15}, {64, 45}},
103 .block_sizes = block_sizes_dv2550,
105 .audio_min_samples = { 1896, 1742, 1264 },
106 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
107 .audio_shuffle = dv_audio_shuffle625,
111 .frame_size = 144000,
114 .time_base = { 1, 25 },
118 .sar = {{16, 15}, {64, 45}},
121 .block_sizes = block_sizes_dv2550,
123 .audio_min_samples = { 1896, 1742, 1264 },
124 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
125 .audio_shuffle = dv_audio_shuffle625,
129 .frame_size = 240000,
132 .time_base = { 1001, 30000 },
136 .sar = {{8, 9}, {32, 27}},
139 .block_sizes = block_sizes_dv2550,
141 .audio_min_samples = { 1580, 1452, 1053 },
142 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 },
143 .audio_shuffle = dv_audio_shuffle525,
147 .frame_size = 288000,
150 .time_base = { 1, 25 },
154 .sar = {{16, 15}, {64, 45}},
157 .block_sizes = block_sizes_dv2550,
159 .audio_min_samples = { 1896, 1742, 1264 },
160 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
161 .audio_shuffle = dv_audio_shuffle625,
165 .frame_size = 480000,
168 .time_base = { 1001, 30000 },
172 .sar = {{1, 1}, {3, 2}},
175 .block_sizes = block_sizes_dv100,
177 .audio_min_samples = { 1580, 1452, 1053 },
178 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 },
179 .audio_shuffle = dv_audio_shuffle525,
183 .frame_size = 576000,
186 .time_base = { 1, 25 },
190 .sar = {{1, 1}, {4, 3}},
193 .block_sizes = block_sizes_dv100,
195 .audio_min_samples = { 1896, 1742, 1264 },
196 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
197 .audio_shuffle = dv_audio_shuffle625,
201 .frame_size = 240000,
204 .time_base = { 1001, 60000 },
208 .sar = {{1, 1}, {4, 3}},
211 .block_sizes = block_sizes_dv100,
213 .audio_min_samples = { 1580, 1452, 1053 },
214 .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 },
215 .audio_shuffle = dv_audio_shuffle525,
219 .frame_size = 288000,
222 .time_base = { 1, 50 },
226 .sar = {{1, 1}, {4, 3}},
229 .block_sizes = block_sizes_dv100,
231 .audio_min_samples = { 1896, 1742, 1264 },
232 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
233 .audio_shuffle = dv_audio_shuffle625,
237 .frame_size = 144000,
240 .time_base = { 1, 25 },
244 .sar = {{16, 15}, {64, 45}},
247 .block_sizes = block_sizes_dv2550,
249 .audio_min_samples = { 1896, 1742, 1264 },
250 .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
251 .audio_shuffle = dv_audio_shuffle625,
260 av_log(logctx, loglevel,
"Frame size: %dx%d; pixel format: %s, "
277 dsf = (frame[3] & 0x80) >> 7;
278 stype = frame[80 * 5 + 48 + 3] & 0x1f;
281 if ((dsf == 1 && stype == 0 && frame[4] & 0x07 ) ||
283 return &dv_profiles[2];
291 return &dv_profiles[1];
294 if (dsf == dv_profiles[i].dsf && stype == dv_profiles[i].video_stype)
295 return &dv_profiles[i];
302 if ((frame[3] & 0x7f) == 0x3f && frame[80 * 5 + 48 + 3] == 0xff)
303 return &dv_profiles[dsf];
322 if (height == dv_profiles[i].height &&
323 pix_fmt == dv_profiles[i].pix_fmt &&
324 width == dv_profiles[i].width)
325 return &dv_profiles[i];
331 #if LIBAVCODEC_VERSION_MAJOR < 56