add stub dsp/enc_avx2.c
VP8EncDspInitAVX2 is included in sse2 builds for now, later a configure flag should be added to avoid the stub when avx2 is unavailable/disabled Change-Id: I6127b687c273f46f41652aaf8e3b86ae3cfb8108
This commit is contained in:
parent
1b99c09cdc
commit
178e9a69ae
@ -39,6 +39,7 @@ LOCAL_SRC_FILES := \
|
||||
src/dsp/dec_neon.$(NEON) \
|
||||
src/dsp/dec_sse2.c \
|
||||
src/dsp/enc.c \
|
||||
src/dsp/enc_avx2.c \
|
||||
src/dsp/enc_mips32.c \
|
||||
src/dsp/enc_neon.$(NEON) \
|
||||
src/dsp/enc_sse2.c \
|
||||
|
@ -184,6 +184,7 @@ DSP_DEC_OBJS = \
|
||||
|
||||
DSP_ENC_OBJS = \
|
||||
$(DIROBJ)\dsp\enc.obj \
|
||||
$(DIROBJ)\dsp\enc_avx2.obj \
|
||||
$(DIROBJ)\dsp\enc_mips32.obj \
|
||||
$(DIROBJ)\dsp\enc_neon.obj \
|
||||
$(DIROBJ)\dsp\enc_sse2.obj \
|
||||
|
@ -119,6 +119,7 @@ DSP_DEC_OBJS = \
|
||||
|
||||
DSP_ENC_OBJS = \
|
||||
src/dsp/enc.o \
|
||||
src/dsp/enc_avx2.o \
|
||||
src/dsp/enc_mips32.o \
|
||||
src/dsp/enc_neon.o \
|
||||
src/dsp/enc_sse2.o \
|
||||
|
@ -1,5 +1,5 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src
|
||||
noinst_LTLIBRARIES = libwebpdsp.la
|
||||
noinst_LTLIBRARIES = libwebpdsp.la libwebpdsp_avx2.la
|
||||
|
||||
if BUILD_LIBWEBPDECODER
|
||||
noinst_LTLIBRARIES += libwebpdspdecode.la
|
||||
@ -35,18 +35,25 @@ ENC_SOURCES += enc_mips32.c
|
||||
ENC_SOURCES += enc_neon.c
|
||||
ENC_SOURCES += enc_sse2.c
|
||||
|
||||
libwebpdsp_avx2_la_SOURCES =
|
||||
libwebpdsp_avx2_la_SOURCES += enc_avx2.c
|
||||
libwebpdsp_avx2_la_CPPFLAGS = $(libwebpdsp_la_CPPFLAGS)
|
||||
libwebpdsp_avx2_la_CFLAGS = $(AM_CFLAGS) $(AVX2_FLAGS)
|
||||
|
||||
libwebpdsp_la_SOURCES = $(COMMON_SOURCES) $(ENC_SOURCES)
|
||||
|
||||
noinst_HEADERS =
|
||||
noinst_HEADERS += ../dec/decode_vp8.h
|
||||
noinst_HEADERS += ../webp/decode.h
|
||||
|
||||
libwebpdsp_la_LDFLAGS = -lm
|
||||
libwebpdsp_la_CPPFLAGS = $(USE_EXPERIMENTAL_CODE) $(USE_SWAP_16BIT_CSP)
|
||||
libwebpdsp_la_LDFLAGS = -lm
|
||||
libwebpdsp_la_LIBADD = libwebpdsp_avx2.la
|
||||
|
||||
if BUILD_LIBWEBPDECODER
|
||||
libwebpdspdecode_la_SOURCES = $(COMMON_SOURCES)
|
||||
|
||||
libwebpdspdecode_la_LDFLAGS = $(libwebpdsp_la_LDFLAGS)
|
||||
libwebpdspdecode_la_CPPFLAGS = $(libwebpdsp_la_CPPFLAGS)
|
||||
libwebpdspdecode_la_LDFLAGS = $(libwebpdsp_la_LDFLAGS)
|
||||
libwebpdspdecode_la_LIBADD = libwebpdsp_avx2.la
|
||||
endif
|
||||
|
@ -688,6 +688,7 @@ VP8QuantizeBlockWHT VP8EncQuantizeBlockWHT;
|
||||
VP8BlockCopy VP8Copy4x4;
|
||||
|
||||
extern void VP8EncDspInitSSE2(void);
|
||||
extern void VP8EncDspInitAVX2(void);
|
||||
extern void VP8EncDspInitNEON(void);
|
||||
extern void VP8EncDspInitMIPS32(void);
|
||||
|
||||
@ -719,6 +720,12 @@ void VP8EncDspInit(void) {
|
||||
if (VP8GetCPUInfo(kSSE2)) {
|
||||
VP8EncDspInitSSE2();
|
||||
}
|
||||
// TODO(jzern): this should be conditionally included based on a configure
|
||||
// (HAVE_AVX2) define. We can't use WEBP_USE_AVX2/__AVX2__ here as -mavx2
|
||||
// won't be defined for this file.
|
||||
if (VP8GetCPUInfo(kAVX2)) {
|
||||
VP8EncDspInitAVX2();
|
||||
}
|
||||
#elif defined(WEBP_USE_NEON)
|
||||
if (VP8GetCPUInfo(kNEON)) {
|
||||
VP8EncDspInitNEON();
|
||||
|
24
src/dsp/enc_avx2.c
Normal file
24
src/dsp/enc_avx2.c
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2014 Google Inc. All Rights Reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the COPYING file in the root of the source
|
||||
// tree. An additional intellectual property rights grant can be found
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// AVX2 version of speed-critical encoding functions.
|
||||
|
||||
#include "./dsp.h"
|
||||
|
||||
#if defined(WEBP_USE_AVX2)
|
||||
|
||||
#endif // WEBP_USE_AVX2
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Entry point
|
||||
|
||||
extern void VP8EncDspInitAVX2(void);
|
||||
|
||||
void VP8EncDspInitAVX2(void) {
|
||||
}
|
Loading…
Reference in New Issue
Block a user