Mercurial > libavcodec.hg
comparison wavpack.c @ 8607:79b1cf27cfea libavcodec
WavPack hybrid mode support
author | kostya |
---|---|
date | Fri, 16 Jan 2009 17:46:19 +0000 |
parents | f11197441364 |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
8606:c3a96cea3453 | 8607:79b1cf27cfea |
---|---|
26 /** | 26 /** |
27 * @file wavpack.c | 27 * @file wavpack.c |
28 * WavPack lossless audio decoder | 28 * WavPack lossless audio decoder |
29 */ | 29 */ |
30 | 30 |
31 #define WV_MONO 0x00000004 | |
31 #define WV_JOINT_STEREO 0x00000010 | 32 #define WV_JOINT_STEREO 0x00000010 |
32 #define WV_FALSE_STEREO 0x40000000 | 33 #define WV_FALSE_STEREO 0x40000000 |
34 | |
35 #define WV_HYBRID_MODE 0x00000008 | |
36 #define WV_HYBRID_SHAPE 0x00000008 | |
37 #define WV_HYBRID_BITRATE 0x00000200 | |
38 #define WV_HYBRID_BALANCE 0x00000400 | |
33 | 39 |
34 enum WP_ID_Flags{ | 40 enum WP_ID_Flags{ |
35 WP_IDF_MASK = 0x1F, | 41 WP_IDF_MASK = 0x1F, |
36 WP_IDF_IGNORE = 0x20, | 42 WP_IDF_IGNORE = 0x20, |
37 WP_IDF_ODD = 0x40, | 43 WP_IDF_ODD = 0x40, |
64 int weightB; | 70 int weightB; |
65 int samplesA[8]; | 71 int samplesA[8]; |
66 int samplesB[8]; | 72 int samplesB[8]; |
67 } Decorr; | 73 } Decorr; |
68 | 74 |
75 typedef struct WvChannel { | |
76 int median[3]; | |
77 int slow_level, error_limit; | |
78 int bitrate_acc, bitrate_delta; | |
79 } WvChannel; | |
80 | |
69 typedef struct WavpackContext { | 81 typedef struct WavpackContext { |
70 AVCodecContext *avctx; | 82 AVCodecContext *avctx; |
83 int frame_flags; | |
71 int stereo, stereo_in; | 84 int stereo, stereo_in; |
72 int joint; | 85 int joint; |
73 uint32_t CRC; | 86 uint32_t CRC; |
74 GetBitContext gb; | 87 GetBitContext gb; |
75 int data_size; // in bits | 88 int data_size; // in bits |
76 int samples; | 89 int samples; |
77 int median[6]; | |
78 int terms; | 90 int terms; |
79 Decorr decorr[MAX_TERMS]; | 91 Decorr decorr[MAX_TERMS]; |
80 int zero, one, zeroes; | 92 int zero, one, zeroes; |
81 int and, or, shift; | 93 int and, or, shift; |
94 int hybrid, hybrid_bitrate; | |
95 WvChannel ch[2]; | |
82 } WavpackContext; | 96 } WavpackContext; |
83 | 97 |
84 // exponent table copied from WavPack source | 98 // exponent table copied from WavPack source |
85 static const uint8_t wp_exp2_table [256] = { | 99 static const uint8_t wp_exp2_table [256] = { |
86 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, | 100 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, |
99 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, | 113 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, |
100 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9, | 114 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9, |
101 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff | 115 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff |
102 }; | 116 }; |
103 | 117 |
118 static const uint8_t wp_log2_table [] = { | |
119 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15, | |
120 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, | |
121 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e, | |
122 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51, | |
123 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, | |
124 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75, | |
125 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, | |
126 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, | |
127 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, | |
128 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2, | |
129 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0, | |
130 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce, | |
131 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb, | |
132 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7, | |
133 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4, | |
134 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff | |
135 }; | |
136 | |
104 static av_always_inline int wp_exp2(int16_t val) | 137 static av_always_inline int wp_exp2(int16_t val) |
105 { | 138 { |
106 int res, neg = 0; | 139 int res, neg = 0; |
107 | 140 |
108 if(val < 0){ | 141 if(val < 0){ |
114 val >>= 8; | 147 val >>= 8; |
115 res = (val > 9) ? (res << (val - 9)) : (res >> (9 - val)); | 148 res = (val > 9) ? (res << (val - 9)) : (res >> (9 - val)); |
116 return neg ? -res : res; | 149 return neg ? -res : res; |
117 } | 150 } |
118 | 151 |
152 static av_always_inline int wp_log2(int32_t val) | |
153 { | |
154 int bits; | |
155 | |
156 if(!val) | |
157 return 0; | |
158 if(val == 1) | |
159 return 256; | |
160 val += val >> 9; | |
161 bits = av_log2(val) + 1; | |
162 if(bits < 9) | |
163 return (bits << 8) + wp_log2_table[(val << (9 - bits)) & 0xFF]; | |
164 else | |
165 return (bits << 8) + wp_log2_table[(val >> (bits - 9)) & 0xFF]; | |
166 } | |
167 | |
168 #define LEVEL_DECAY(a) ((a + 0x80) >> 8) | |
169 | |
119 // macros for manipulating median values | 170 // macros for manipulating median values |
120 #define GET_MED(n) ((median[n] >> 4) + 1) | 171 #define GET_MED(n) ((c->median[n] >> 4) + 1) |
121 #define DEC_MED(n) median[n] -= ((median[n] + (128>>n) - 2) / (128>>n)) * 2 | 172 #define DEC_MED(n) c->median[n] -= ((c->median[n] + (128>>n) - 2) / (128>>n)) * 2 |
122 #define INC_MED(n) median[n] += ((median[n] + (128>>n)) / (128>>n)) * 5 | 173 #define INC_MED(n) c->median[n] += ((c->median[n] + (128>>n)) / (128>>n)) * 5 |
123 | 174 |
124 // macros for applying weight | 175 // macros for applying weight |
125 #define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \ | 176 #define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \ |
126 if(samples && in){ \ | 177 if(samples && in){ \ |
127 if((samples ^ in) < 0){ \ | 178 if((samples ^ in) < 0){ \ |
146 res = (res<<1) - e + get_bits1(gb); | 197 res = (res<<1) - e + get_bits1(gb); |
147 } | 198 } |
148 return res; | 199 return res; |
149 } | 200 } |
150 | 201 |
151 static int wv_get_value(WavpackContext *ctx, GetBitContext *gb, int *median, int *last) | 202 static void update_error_limit(WavpackContext *ctx) |
203 { | |
204 int i, br[2], sl[2]; | |
205 | |
206 for(i = 0; i <= ctx->stereo_in; i++){ | |
207 ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta; | |
208 br[i] = ctx->ch[i].bitrate_acc >> 16; | |
209 sl[i] = LEVEL_DECAY(ctx->ch[i].slow_level); | |
210 } | |
211 if(ctx->stereo_in && ctx->hybrid_bitrate){ | |
212 int balance = (sl[1] - sl[0] + br[1] + 1) >> 1; | |
213 if(balance > br[0]){ | |
214 br[1] = br[0] << 1; | |
215 br[0] = 0; | |
216 }else if(-balance > br[0]){ | |
217 br[0] <<= 1; | |
218 br[1] = 0; | |
219 }else{ | |
220 br[1] = br[0] + balance; | |
221 br[0] = br[0] - balance; | |
222 } | |
223 } | |
224 for(i = 0; i <= ctx->stereo_in; i++){ | |
225 if(ctx->hybrid_bitrate){ | |
226 if(sl[i] - br[i] > -0x100) | |
227 ctx->ch[i].error_limit = wp_exp2(sl[i] - br[i] + 0x100); | |
228 else | |
229 ctx->ch[i].error_limit = 0; | |
230 }else{ | |
231 ctx->ch[i].error_limit = wp_exp2(br[i]); | |
232 } | |
233 } | |
234 } | |
235 | |
236 static int wv_get_value(WavpackContext *ctx, GetBitContext *gb, int channel, int *last) | |
152 { | 237 { |
153 int t, t2; | 238 int t, t2; |
154 int sign, base, add, ret; | 239 int sign, base, add, ret; |
240 WvChannel *c = &ctx->ch[channel]; | |
155 | 241 |
156 *last = 0; | 242 *last = 0; |
157 | 243 |
158 if((ctx->median[0] < 2U) && (ctx->median[3] < 2U) && !ctx->zero && !ctx->one){ | 244 if((ctx->ch[0].median[0] < 2U) && (ctx->ch[1].median[0] < 2U) && !ctx->zero && !ctx->one){ |
159 if(ctx->zeroes){ | 245 if(ctx->zeroes){ |
160 ctx->zeroes--; | 246 ctx->zeroes--; |
161 if(ctx->zeroes) | 247 if(ctx->zeroes){ |
248 c->slow_level -= LEVEL_DECAY(c->slow_level); | |
162 return 0; | 249 return 0; |
250 } | |
163 }else{ | 251 }else{ |
164 t = get_unary_0_33(gb); | 252 t = get_unary_0_33(gb); |
165 if(t >= 2) t = get_bits(gb, t - 1) | (1 << (t-1)); | 253 if(t >= 2) t = get_bits(gb, t - 1) | (1 << (t-1)); |
166 ctx->zeroes = t; | 254 ctx->zeroes = t; |
167 if(ctx->zeroes){ | 255 if(ctx->zeroes){ |
168 memset(ctx->median, 0, sizeof(ctx->median)); | 256 memset(ctx->ch[0].median, 0, sizeof(ctx->ch[0].median)); |
257 memset(ctx->ch[1].median, 0, sizeof(ctx->ch[1].median)); | |
258 c->slow_level -= LEVEL_DECAY(c->slow_level); | |
169 return 0; | 259 return 0; |
170 } | 260 } |
171 } | 261 } |
172 } | 262 } |
173 | 263 |
198 ctx->one = t&1; | 288 ctx->one = t&1; |
199 t >>= 1; | 289 t >>= 1; |
200 } | 290 } |
201 ctx->zero = !ctx->one; | 291 ctx->zero = !ctx->one; |
202 } | 292 } |
293 | |
294 if(ctx->hybrid && !channel) | |
295 update_error_limit(ctx); | |
203 | 296 |
204 if(!t){ | 297 if(!t){ |
205 base = 0; | 298 base = 0; |
206 add = GET_MED(0) - 1; | 299 add = GET_MED(0) - 1; |
207 DEC_MED(0); | 300 DEC_MED(0); |
221 add = GET_MED(2) - 1; | 314 add = GET_MED(2) - 1; |
222 INC_MED(0); | 315 INC_MED(0); |
223 INC_MED(1); | 316 INC_MED(1); |
224 INC_MED(2); | 317 INC_MED(2); |
225 } | 318 } |
226 ret = base + get_tail(gb, add); | 319 if(!c->error_limit){ |
320 ret = base + get_tail(gb, add); | |
321 }else{ | |
322 int mid = (base*2 + add + 1) >> 1; | |
323 while(add > c->error_limit){ | |
324 if(get_bits1(gb)){ | |
325 add -= (mid - base); | |
326 base = mid; | |
327 }else | |
328 add = mid - base - 1; | |
329 mid = (base*2 + add + 1) >> 1; | |
330 } | |
331 ret = mid; | |
332 } | |
227 sign = get_bits1(gb); | 333 sign = get_bits1(gb); |
334 if(ctx->hybrid_bitrate) | |
335 c->slow_level += wp_log2(ret) - LEVEL_DECAY(c->slow_level); | |
228 return sign ? ~ret : ret; | 336 return sign ? ~ret : ret; |
229 } | 337 } |
230 | 338 |
231 static int wv_unpack_stereo(WavpackContext *s, GetBitContext *gb, int16_t *dst) | 339 static int wv_unpack_stereo(WavpackContext *s, GetBitContext *gb, int16_t *dst) |
232 { | 340 { |
236 int pos = 0; | 344 int pos = 0; |
237 uint32_t crc = 0xFFFFFFFF; | 345 uint32_t crc = 0xFFFFFFFF; |
238 | 346 |
239 s->one = s->zero = s->zeroes = 0; | 347 s->one = s->zero = s->zeroes = 0; |
240 do{ | 348 do{ |
241 L = wv_get_value(s, gb, s->median, &last); | 349 L = wv_get_value(s, gb, 0, &last); |
242 if(last) break; | 350 if(last) break; |
243 R = wv_get_value(s, gb, s->median + 3, &last); | 351 R = wv_get_value(s, gb, 1, &last); |
244 if(last) break; | 352 if(last) break; |
245 for(i = 0; i < s->terms; i++){ | 353 for(i = 0; i < s->terms; i++){ |
246 t = s->decorr[i].value; | 354 t = s->decorr[i].value; |
247 j = 0; | 355 j = 0; |
248 if(t > 0){ | 356 if(t > 0){ |
318 int pos = 0; | 426 int pos = 0; |
319 uint32_t crc = 0xFFFFFFFF; | 427 uint32_t crc = 0xFFFFFFFF; |
320 | 428 |
321 s->one = s->zero = s->zeroes = 0; | 429 s->one = s->zero = s->zeroes = 0; |
322 do{ | 430 do{ |
323 T = wv_get_value(s, gb, s->median, &last); | 431 T = wv_get_value(s, gb, 0, &last); |
324 S = 0; | 432 S = 0; |
325 if(last) break; | 433 if(last) break; |
326 for(i = 0; i < s->terms; i++){ | 434 for(i = 0; i < s->terms; i++){ |
327 t = s->decorr[i].value; | 435 t = s->decorr[i].value; |
328 if(t > 8){ | 436 if(t > 8){ |
372 { | 480 { |
373 WavpackContext *s = avctx->priv_data; | 481 WavpackContext *s = avctx->priv_data; |
374 int16_t *samples = data; | 482 int16_t *samples = data; |
375 int samplecount; | 483 int samplecount; |
376 int got_terms = 0, got_weights = 0, got_samples = 0, got_entropy = 0, got_bs = 0; | 484 int got_terms = 0, got_weights = 0, got_samples = 0, got_entropy = 0, got_bs = 0; |
485 int got_hybrid = 0; | |
377 const uint8_t* buf_end = buf + buf_size; | 486 const uint8_t* buf_end = buf + buf_size; |
378 int i, j, id, size, ssize, weights, t; | 487 int i, j, id, size, ssize, weights, t; |
379 | 488 |
380 if (buf_size == 0){ | 489 if (buf_size == 0){ |
381 *data_size = 0; | 490 *data_size = 0; |
382 return 0; | 491 return 0; |
383 } | 492 } |
384 | 493 |
385 memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); | 494 memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); |
386 memset(s->median, 0, sizeof(s->median)); | 495 memset(s->ch, 0, sizeof(s->ch)); |
387 s->and = s->or = s->shift = 0; | 496 s->and = s->or = s->shift = 0; |
388 | 497 |
389 s->samples = AV_RL32(buf); buf += 4; | 498 s->samples = AV_RL32(buf); buf += 4; |
390 if(!s->samples){ | 499 if(!s->samples){ |
391 *data_size = 0; | 500 *data_size = 0; |
394 /* should not happen but who knows */ | 503 /* should not happen but who knows */ |
395 if(s->samples * 2 * avctx->channels > *data_size){ | 504 if(s->samples * 2 * avctx->channels > *data_size){ |
396 av_log(avctx, AV_LOG_ERROR, "Packet size is too big to be handled in lavc!\n"); | 505 av_log(avctx, AV_LOG_ERROR, "Packet size is too big to be handled in lavc!\n"); |
397 return -1; | 506 return -1; |
398 } | 507 } |
399 s->stereo_in = (AV_RL32(buf) & WV_FALSE_STEREO) ? 0 : s->stereo; | 508 s->frame_flags = AV_RL32(buf); buf += 4; |
400 s->joint = AV_RL32(buf) & WV_JOINT_STEREO; buf += 4; | 509 s->stereo_in = (s->frame_flags & WV_FALSE_STEREO) ? 0 : s->stereo; |
510 s->joint = s->frame_flags & WV_JOINT_STEREO; | |
511 s->hybrid = s->frame_flags & WV_HYBRID_MODE; | |
512 s->hybrid_bitrate = s->frame_flags & WV_HYBRID_BITRATE; | |
401 s->CRC = AV_RL32(buf); buf += 4; | 513 s->CRC = AV_RL32(buf); buf += 4; |
402 // parse metadata blocks | 514 // parse metadata blocks |
403 while(buf < buf_end){ | 515 while(buf < buf_end){ |
404 id = *buf++; | 516 id = *buf++; |
405 size = *buf++; | 517 size = *buf++; |
498 if(size != 6 * (s->stereo_in + 1)){ | 610 if(size != 6 * (s->stereo_in + 1)){ |
499 av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, got %i", 6 * (s->stereo_in + 1), size); | 611 av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, got %i", 6 * (s->stereo_in + 1), size); |
500 buf += ssize; | 612 buf += ssize; |
501 continue; | 613 continue; |
502 } | 614 } |
503 for(i = 0; i < 3 * (s->stereo_in + 1); i++){ | 615 for(j = 0; j <= s->stereo_in; j++){ |
504 s->median[i] = wp_exp2(AV_RL16(buf)); | 616 for(i = 0; i < 3; i++){ |
617 s->ch[j].median[i] = wp_exp2(AV_RL16(buf)); | |
618 buf += 2; | |
619 } | |
620 } | |
621 got_entropy = 1; | |
622 break; | |
623 case WP_ID_HYBRID: | |
624 if(s->hybrid_bitrate){ | |
625 for(i = 0; i <= s->stereo_in; i++){ | |
626 s->ch[i].slow_level = wp_exp2(AV_RL16(buf)); | |
627 buf += 2; | |
628 size -= 2; | |
629 } | |
630 } | |
631 for(i = 0; i < (s->stereo_in + 1); i++){ | |
632 s->ch[i].bitrate_acc = AV_RL16(buf) << 16; | |
505 buf += 2; | 633 buf += 2; |
506 } | 634 size -= 2; |
507 got_entropy = 1; | 635 } |
636 if(size > 0){ | |
637 for(i = 0; i < (s->stereo_in + 1); i++){ | |
638 s->ch[i].bitrate_delta = wp_exp2((int16_t)AV_RL16(buf)); | |
639 buf += 2; | |
640 } | |
641 }else{ | |
642 for(i = 0; i < (s->stereo_in + 1); i++) | |
643 s->ch[i].bitrate_delta = 0; | |
644 } | |
645 got_hybrid = 1; | |
508 break; | 646 break; |
509 case WP_ID_INT32INFO: | 647 case WP_ID_INT32INFO: |
510 if(size != 4 || *buf){ | 648 if(size != 4 || *buf){ |
511 av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i, sent_bits = %i\n", size, *buf); | 649 av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i, sent_bits = %i\n", size, *buf); |
512 buf += ssize; | 650 buf += ssize; |
546 av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n"); | 684 av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n"); |
547 return -1; | 685 return -1; |
548 } | 686 } |
549 if(!got_entropy){ | 687 if(!got_entropy){ |
550 av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n"); | 688 av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n"); |
689 return -1; | |
690 } | |
691 if(s->hybrid && !got_hybrid){ | |
692 av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n"); | |
551 return -1; | 693 return -1; |
552 } | 694 } |
553 if(!got_bs){ | 695 if(!got_bs){ |
554 av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n"); | 696 av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n"); |
555 return -1; | 697 return -1; |