Bug 1295886 - P10. Add a FLAC only option to ffvpx. r=gerald

Remove the VP8 and VP9 decoder and the subsequently unused functions.

This drops the size to libmozavcodec to around 1MB down from 4MB.

MozReview-Commit-ID: Ge57fauG35L

--HG--
extra : rebase_source : 3f667d7bf89036e9b059727d846af2504ce488b3
This commit is contained in:
Jean-Yves Avenard 2017-11-01 19:01:59 +01:00
Родитель ddd448a846
Коммит 3f07325414
3 изменённых файлов: 55 добавлений и 42 удалений

Просмотреть файл

@ -12,11 +12,7 @@ if CONFIG['FFVPX_ASFLAGS']:
SharedLibrary('mozavcodec')
SOURCES += [
'allcodecs.c',
'audioconvert.c',
'avpacket.c',
'avpicture.c',
'bitstream.c',
'bitstream_filter.c',
'bitstream_filters.c',
'bsf.c',
'codec_desc.c',
@ -26,11 +22,6 @@ SOURCES += [
'flacdata.c',
'flacdec.c',
'flacdsp.c',
'golomb.c',
'h264pred.c',
'imgconvert.c',
'log2_tab.c',
'mathtables.c',
'null_bsf.c',
'options.c',
'parser.c',
@ -38,33 +29,46 @@ SOURCES += [
'pthread.c',
'pthread_frame.c',
'pthread_slice.c',
'qsv_api.c',
'raw.c',
'resample.c',
'resample2.c',
'reverse.c',
'utils.c',
'videodsp.c',
'vorbis_parser.c',
'vp56rac.c',
'vp8.c',
'vp8_parser.c',
'vp8dsp.c',
'vp9.c',
'vp9_parser.c',
'vp9block.c',
'vp9data.c',
'vp9dsp.c',
'vp9dsp_10bpp.c',
'vp9dsp_12bpp.c',
'vp9dsp_8bpp.c',
'vp9lpf.c',
'vp9mvs.c',
'vp9prob.c',
'vp9recon.c',
'xiph.c'
]
if not CONFIG['MOZ_FFVPX_FLACONLY']:
SOURCES += [
'audioconvert.c',
'avpicture.c',
'bitstream.c',
'bitstream_filter.c',
'golomb.c',
'h264pred.c',
'imgconvert.c',
'log2_tab.c',
'mathtables.c',
'qsv_api.c',
'raw.c',
'resample.c',
'resample2.c',
'reverse.c',
'videodsp.c',
'vp56rac.c',
'vp8.c',
'vp8_parser.c',
'vp8dsp.c',
'vp9.c',
'vp9_parser.c',
'vp9block.c',
'vp9data.c',
'vp9dsp.c',
'vp9dsp_10bpp.c',
'vp9dsp_12bpp.c',
'vp9dsp_8bpp.c',
'vp9lpf.c',
'vp9mvs.c',
'vp9prob.c',
'vp9recon.c'
]
SYMBOLS_FILE = 'avcodec.symbols'
NoVisibilityFlags()

Просмотреть файл

@ -11,14 +11,11 @@ if CONFIG['FFVPX_ASFLAGS']:
SharedLibrary('mozavutil')
SOURCES += [
'adler32.c',
'atomic.c',
'avstring.c',
'base64.c',
'bprint.c',
'buffer.c',
'channel_layout.c',
'color_utils.c',
'cpu.c',
'crc.c',
'dict.c',
@ -30,27 +27,33 @@ SOURCES += [
'float_dsp.c',
'frame.c',
'imgutils.c',
'integer.c',
'intmath.c',
'lls.c',
'log.c',
'log2_tab.c',
'mathematics.c',
'mem.c',
'opt.c',
'parseutils.c',
'pixdesc.c',
'pixelutils.c',
'rational.c',
'reverse.c',
'samplefmt.c',
'slicethread.c',
'threadmessage.c',
'time.c',
'timecode.c',
'utils.c',
'utils.c'
]
if not CONFIG['MOZ_FFVPX_FLACONLY']:
SOURCES += [
'adler32.c',
'base64.c',
'color_utils.c',
'integer.c',
'intmath.c',
'lls.c',
'pixelutils.c',
'threadmessage.c',
'timecode.c'
]
SYMBOLS_FILE = 'avutil.symbols'
NoVisibilityFlags()

Просмотреть файл

@ -3214,6 +3214,7 @@ dnl = FFmpeg's ffvpx configuration
dnl ========================================================
MOZ_FFVPX=
MOZ_FFVPX_FLACONLY=
case "$CPU_ARCH" in
x86)
MOZ_FFVPX=1
@ -3223,6 +3224,7 @@ case "$CPU_ARCH" in
;;
arm*)
MOZ_FFVPX=1
MOZ_FFVPX_FLACONLY=1
;;
esac
@ -3233,6 +3235,9 @@ fi
if test -n "$MOZ_FFVPX"; then
AC_DEFINE(MOZ_FFVPX)
fi
if test -n "$MOZ_FFVPX_FLACONLY"; then
AC_DEFINE(MOZ_FFVPX_FLACONLY)
fi
dnl ========================================================
dnl = Enable compilation of specific extension modules
@ -4808,6 +4813,7 @@ AC_SUBST(WIN32_GUI_EXE_LDFLAGS)
AC_SUBST(MOZ_VORBIS)
AC_SUBST(MOZ_TREMOR)
AC_SUBST(MOZ_FFVPX)
AC_SUBST(MOZ_FFVPX_FLACONLY)
AC_SUBST_LIST(FFVPX_ASFLAGS)
AC_SUBST(VPX_USE_YASM)
AC_SUBST_LIST(VPX_ASFLAGS)