source: freewrt/package/flac/patches/no_encoder.patch@ 428f140

freewrt_1_0 freewrt_2_0
Last change on this file since 428f140 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
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  
    5858
    5959debug   : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
    6060valgrind: 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)
     61release : CFLAGS = -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
    6262
    6363LFLAGS  = -L$(LIBPATH)
    6464
  • 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  
    293293
    294294void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[])
    295295{
     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
     497void 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{
    296499#ifdef FLAC__OVERFLOW_DETECT
    297500        FLAC__int64 sumo;
    298501#endif
     
    339542        }
    340543        */
    341544}
     545#endif /* 0 */
    342546
    343547void 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[])
    344548{
  • 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  
    4141ifeq ($(SOLARIS_BUILD),yes)
    4242DEFINES = -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA
    4343else
    44 DEFINES = -DFLAC__CPU_IA32 -DFLAC__USE_3DNOW -DFLAC__HAS_NASM -DFLAC__ALIGN_MALLOC_DATA
     44DEFINES = -DFLAC__CPU_UNKNOWN -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA -DFLAC__INTEGER_ONLY_LIBRARY
    4545endif
    4646endif
    4747INCLUDES = -I./include -I$(topdir)/include
     
    5050ifeq ($(DARWIN_BUILD),yes)
    5151SRCS_S = \
    5252        ppc/as/lpc_asm.s
    53 else
    54 ifeq ($(SOLARIS_BUILD),yes)
    55 else
    56 SRCS_NASM = \
    57         ia32/cpu_asm.nasm \
    58         ia32/fixed_asm.nasm \
    59         ia32/lpc_asm.nasm
    60 endif
    6153endif
    6254
    6355SRCS_C = \
     
    6658        cpu.c \
    6759        crc.c \
    6860        file_decoder.c \
    69         file_encoder.c \
    7061        fixed.c \
    7162        float.c \
    7263        format.c \
     
    7667        metadata_iterators.c \
    7768        metadata_object.c \
    7869        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
    8371
    8472include $(topdir)/build/lib.mk
    8573
Note: See TracBrowser for help on using the repository browser.