source:
freewrt/package/flac/patches/no_encoder.patch@
428f140
| Last change on this file since 428f140 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 8.3 KB | |
-
build/lib.mk
diff -ru flac-1.1.2.OLD/build/lib.mk flac-1.1.2.NEW/build/lib.mk
old new 58 58 59 59 debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) 60 60 valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) 61 release : CFLAGS = - O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)61 release : CFLAGS = -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) 62 62 63 63 LFLAGS = -L$(LIBPATH) 64 64 -
src/libFLAC/lpc.c
diff -ru flac-1.1.2.OLD/src/libFLAC/lpc.c flac-1.1.2.NEW/src/libFLAC/lpc.c
old new 293 293 294 294 void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) 295 295 { 296 register const FLAC__int32 *qlp0 = &qlp_coeff[(order-1)]; 297 register FLAC__int32 sum; 298 register const FLAC__int32 *history, *qlp; 299 300 history = &data[(-order)]; 301 302 switch (order) { 303 case 12: 304 for( ; data_len != 0; --data_len) { 305 sum = (qlp0[0] * history[0]) 306 + (qlp0[-1] * history[1]) 307 + (qlp0[-2] * history[2]) 308 + (qlp0[-3] * history[3]) 309 + (qlp0[-4] * history[4]) 310 + (qlp0[-5] * history[5]) 311 + (qlp0[-6] * history[6]) 312 + (qlp0[-7] * history[7]) 313 + (qlp0[-8] * history[8]) 314 + (qlp0[-9] * history[9]) 315 + (qlp0[-10] * history[10]) 316 + (qlp0[-11] * history[11]) 317 ; 318 ++history; 319 *(data++) = *(residual++) + (sum >> lp_quantization); 320 } 321 return; 322 case 11: 323 for( ; data_len != 0; --data_len) { 324 sum = (qlp0[0] * history[0]) 325 + (qlp0[-1] * history[1]) 326 + (qlp0[-2] * history[2]) 327 + (qlp0[-3] * history[3]) 328 + (qlp0[-4] * history[4]) 329 + (qlp0[-5] * history[5]) 330 + (qlp0[-6] * history[6]) 331 + (qlp0[-7] * history[7]) 332 + (qlp0[-8] * history[8]) 333 + (qlp0[-9] * history[9]) 334 + (qlp0[-10] * history[10]) 335 ; 336 ++history; 337 *(data++) = *(residual++) + (sum >> lp_quantization); 338 } 339 return; 340 case 10: 341 for( ; data_len != 0; --data_len) { 342 sum = (qlp0[0] * history[0]) 343 + (qlp0[-1] * history[1]) 344 + (qlp0[-2] * history[2]) 345 + (qlp0[-3] * history[3]) 346 + (qlp0[-4] * history[4]) 347 + (qlp0[-5] * history[5]) 348 + (qlp0[-6] * history[6]) 349 + (qlp0[-7] * history[7]) 350 + (qlp0[-8] * history[8]) 351 + (qlp0[-9] * history[9]) 352 ; 353 ++history; 354 *(data++) = *(residual++) + (sum >> lp_quantization); 355 } 356 return; 357 case 9: 358 for( ; data_len != 0; --data_len) { 359 sum = (qlp0[0] * history[0]) 360 + (qlp0[-1] * history[1]) 361 + (qlp0[-2] * history[2]) 362 + (qlp0[-3] * history[3]) 363 + (qlp0[-4] * history[4]) 364 + (qlp0[-5] * history[5]) 365 + (qlp0[-6] * history[6]) 366 + (qlp0[-7] * history[7]) 367 + (qlp0[-8] * history[8]) 368 ; 369 ++history; 370 *(data++) = *(residual++) + (sum >> lp_quantization); 371 } 372 return; 373 case 8: 374 for( ; data_len != 0; --data_len) { 375 sum = (qlp0[0] * history[0]) 376 + (qlp0[-1] * history[1]) 377 + (qlp0[-2] * history[2]) 378 + (qlp0[-3] * history[3]) 379 + (qlp0[-4] * history[4]) 380 + (qlp0[-5] * history[5]) 381 + (qlp0[-6] * history[6]) 382 + (qlp0[-7] * history[7]) 383 ; 384 ++history; 385 *(data++) = *(residual++) + (sum >> lp_quantization); 386 } 387 return; 388 case 7: 389 for( ; data_len != 0; --data_len) { 390 sum = (qlp0[0] * history[0]) 391 + (qlp0[-1] * history[1]) 392 + (qlp0[-2] * history[2]) 393 + (qlp0[-3] * history[3]) 394 + (qlp0[-4] * history[4]) 395 + (qlp0[-5] * history[5]) 396 + (qlp0[-6] * history[6]) 397 ; 398 ++history; 399 *(data++) = *(residual++) + (sum >> lp_quantization); 400 } 401 return; 402 case 6: 403 for( ; data_len != 0; --data_len) { 404 sum = (qlp0[0] * history[0]) 405 + (qlp0[-1] * history[1]) 406 + (qlp0[-2] * history[2]) 407 + (qlp0[-3] * history[3]) 408 + (qlp0[-4] * history[4]) 409 + (qlp0[-5] * history[5]) 410 ; 411 ++history; 412 *(data++) = *(residual++) + (sum >> lp_quantization); 413 } 414 return; 415 case 5: 416 for( ; data_len != 0; --data_len) { 417 sum = (qlp0[0] * history[0]) 418 + (qlp0[-1] * history[1]) 419 + (qlp0[-2] * history[2]) 420 + (qlp0[-3] * history[3]) 421 + (qlp0[-4] * history[4]) 422 ; 423 ++history; 424 *(data++) = *(residual++) + (sum >> lp_quantization); 425 } 426 return; 427 case 4: 428 for( ; data_len != 0; --data_len) { 429 sum = (qlp0[0] * history[0]) 430 + (qlp0[-1] * history[1]) 431 + (qlp0[-2] * history[2]) 432 + (qlp0[-3] * history[3]) 433 ; 434 ++history; 435 *(data++) = *(residual++) + (sum >> lp_quantization); 436 } 437 return; 438 case 3: 439 for( ; data_len != 0; --data_len) { 440 sum = (qlp0[0] * history[0]) 441 + (qlp0[-1] * history[1]) 442 + (qlp0[-2] * history[2]) 443 ; 444 ++history; 445 *(data++) = *(residual++) + (sum >> lp_quantization); 446 } 447 return; 448 case 2: 449 for( ; data_len != 0; --data_len) { 450 sum = (qlp0[0] * history[0]) 451 + (qlp0[-1] * history[1]) 452 ; 453 ++history; 454 *(data++) = *(residual++) + (sum >> lp_quantization); 455 } 456 return; 457 case 1: 458 for( ; data_len != 0; --data_len) { 459 sum = (qlp0[0] * (*(history++))); 460 *(data++) = *(residual++) + (sum >> lp_quantization); 461 } 462 return; 463 default: 464 { 465 /* handle everything else: (order > 12) 466 * with Duff's Device to reduce jumps */ 467 const unsigned n0 = (order + 7)/8; 468 const int tmp = 0 - order - 1; 469 register const FLAC__int32 *qlpd = &qlp_coeff[order]; 470 for( ; data_len != 0; --data_len) { 471 register unsigned n = n0; 472 sum = 0; 473 qlp = qlpd; 474 history = &data[tmp]; 475 476 switch(order%8) { 477 case 0: do { 478 sum += (*(--qlp)) * (*(++history)); 479 case 7: sum += (*(--qlp)) * (*(++history)); 480 case 6: sum += (*(--qlp)) * (*(++history)); 481 case 5: sum += (*(--qlp)) * (*(++history)); 482 case 4: sum += (*(--qlp)) * (*(++history)); 483 case 3: sum += (*(--qlp)) * (*(++history)); 484 case 2: sum += (*(--qlp)) * (*(++history)); 485 case 1: sum += (*(--qlp)) * (*(++history)); 486 } while (--n); 487 } 488 489 *(data++) = *(residual++) + (sum >> lp_quantization); 490 } 491 return; 492 } 493 } 494 } 495 496 #if 0 497 void FLAC__lpc_restore_signal_orig(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) 498 { 296 499 #ifdef FLAC__OVERFLOW_DETECT 297 500 FLAC__int64 sumo; 298 501 #endif … … 339 542 } 340 543 */ 341 544 } 545 #endif /* 0 */ 342 546 343 547 void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) 344 548 { -
src/libFLAC/Makefile.lite
diff -ru flac-1.1.2.OLD/src/libFLAC/Makefile.lite flac-1.1.2.NEW/src/libFLAC/Makefile.lite
old new 41 41 ifeq ($(SOLARIS_BUILD),yes) 42 42 DEFINES = -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA 43 43 else 44 DEFINES = -DFLAC__CPU_ IA32 -DFLAC__USE_3DNOW -DFLAC__HAS_NASM -DFLAC__ALIGN_MALLOC_DATA44 DEFINES = -DFLAC__CPU_UNKNOWN -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA -DFLAC__INTEGER_ONLY_LIBRARY 45 45 endif 46 46 endif 47 47 INCLUDES = -I./include -I$(topdir)/include … … 50 50 ifeq ($(DARWIN_BUILD),yes) 51 51 SRCS_S = \ 52 52 ppc/as/lpc_asm.s 53 else54 ifeq ($(SOLARIS_BUILD),yes)55 else56 SRCS_NASM = \57 ia32/cpu_asm.nasm \58 ia32/fixed_asm.nasm \59 ia32/lpc_asm.nasm60 endif61 53 endif 62 54 63 55 SRCS_C = \ … … 66 58 cpu.c \ 67 59 crc.c \ 68 60 file_decoder.c \ 69 file_encoder.c \70 61 fixed.c \ 71 62 float.c \ 72 63 format.c \ … … 76 67 metadata_iterators.c \ 77 68 metadata_object.c \ 78 69 seekable_stream_decoder.c \ 79 seekable_stream_encoder.c \ 80 stream_decoder.c \ 81 stream_encoder.c \ 82 stream_encoder_framing.c 70 stream_decoder.c 83 71 84 72 include $(topdir)/build/lib.mk 85 73
Note:
See TracBrowser
for help on using the repository browser.
