[FFmpeg-cvslog] Merge commit 'f1cd9b03f3fa875eb5e394281b4b688cec611658'
Derek Buitenhuis
git at videolan.org
Wed May 11 20:23:40 CEST 2016
ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Wed May 11 19:23:15 2016 +0100| [e330ab0fb7cb140cfde98077e1a953c200282087] | committer: Derek Buitenhuis
Merge commit 'f1cd9b03f3fa875eb5e394281b4b688cec611658'
* commit 'f1cd9b03f3fa875eb5e394281b4b688cec611658':
omx: Add support for broadcom OMX on raspberry pi
Merged-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e330ab0fb7cb140cfde98077e1a953c200282087
---
Changelog | 2 +-
configure | 9 ++++++++-
libavcodec/omx.c | 50 ++++++++++++++++++++++++++++++++++++++++++++------
libavcodec/version.h | 2 +-
4 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/Changelog b/Changelog
index 8c8978b..46f0ecb 100644
--- a/Changelog
+++ b/Changelog
@@ -32,7 +32,7 @@ version <next>:
- Wideband Single-bit Data (WSD) demuxer
- VAAPI-accelerated H.264/HEVC/MJPEG encoding
- DTS Express (LBR) decoder
-- Generic OpenMAX IL encoder
+- Generic OpenMAX IL encoder with support for Raspberry Pi
version 3.0:
- Common Encryption (CENC) MP4 encoding and decoding support
diff --git a/configure b/configure
index e093e63..9a986ac 100755
--- a/configure
+++ b/configure
@@ -162,6 +162,7 @@ Hardware-accelerated decoding/encoding:
--enable-mmal enable decoding via MMAL [no]
--enable-nvenc enable NVIDIA NVENC support [no]
--enable-omx enable encoding via OpenMAX IL [no]
+ --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi [no]
Individual component options:
--disable-everything disable all components listed below
@@ -1552,6 +1553,7 @@ FEATURE_LIST="
ftrapv
gray
hardcoded_tables
+ omx_rpi
runtime_cpudetect
safe_bitstream_reader
shared
@@ -5730,12 +5732,17 @@ enabled opengl && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
check_lib2 ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
die "ERROR: opengl not found."
}
+enabled omx_rpi && enable omx
+enabled omx && { check_header OMX_Core.h ||
+ { ! enabled cross_compile && enabled omx_rpi && {
+ add_cflags -isystem/opt/vc/include/IL ; }
+ check_header OMX_Core.h ; } ||
+ die "ERROR: OpenMAX IL headers not found"; }
enabled openssl && { use_pkg_config openssl openssl/ssl.h SSL_library_init ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }
-enabled omx && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
enabled qtkit_indev && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; }
# libdc1394 check
diff --git a/libavcodec/omx.c b/libavcodec/omx.c
index a138d2c..c219ec0 100644
--- a/libavcodec/omx.c
+++ b/libavcodec/omx.c
@@ -19,6 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+
+#if CONFIG_OMX_RPI
+#define OMX_SKIP64BIT
+#endif
+
#include <dlfcn.h>
#include <OMX_Core.h>
#include <OMX_Component.h>
@@ -69,6 +75,7 @@ static int64_t from_omx_ticks(OMX_TICKS value)
typedef struct OMXContext {
void *lib;
+ void *lib2;
OMX_ERRORTYPE (*ptr_Init)(void);
OMX_ERRORTYPE (*ptr_Deinit)(void);
OMX_ERRORTYPE (*ptr_ComponentNameEnum)(OMX_STRING, OMX_U32, OMX_U32);
@@ -76,6 +83,7 @@ typedef struct OMXContext {
OMX_ERRORTYPE (*ptr_FreeHandle)(OMX_HANDLETYPE);
OMX_ERRORTYPE (*ptr_GetComponentsOfRole)(OMX_STRING, OMX_U32*, OMX_U8**);
OMX_ERRORTYPE (*ptr_GetRolesOfComponent)(OMX_STRING, OMX_U32*, OMX_U8**);
+ void (*host_init)(void);
} OMXContext;
static av_cold void *dlsym_prefixed(void *handle, const char *symbol, const char *prefix)
@@ -86,8 +94,23 @@ static av_cold void *dlsym_prefixed(void *handle, const char *symbol, const char
}
static av_cold int omx_try_load(OMXContext *s, void *logctx,
- const char *libname, const char *prefix)
+ const char *libname, const char *prefix,
+ const char *libname2)
{
+ if (libname2) {
+ s->lib2 = dlopen(libname2, RTLD_NOW | RTLD_GLOBAL);
+ if (!s->lib2) {
+ av_log(logctx, AV_LOG_WARNING, "%s not found\n", libname);
+ return AVERROR_ENCODER_NOT_FOUND;
+ }
+ s->host_init = dlsym(s->lib2, "bcm_host_init");
+ if (!s->host_init) {
+ av_log(logctx, AV_LOG_WARNING, "bcm_host_init not found\n");
+ dlclose(s->lib2);
+ s->lib2 = NULL;
+ return AVERROR_ENCODER_NOT_FOUND;
+ }
+ }
s->lib = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);
if (!s->lib) {
av_log(logctx, AV_LOG_WARNING, "%s not found\n", libname);
@@ -106,6 +129,9 @@ static av_cold int omx_try_load(OMXContext *s, void *logctx,
av_log(logctx, AV_LOG_WARNING, "Not all functions found in %s\n", libname);
dlclose(s->lib);
s->lib = NULL;
+ if (s->lib2)
+ dlclose(s->lib2);
+ s->lib2 = NULL;
return AVERROR_ENCODER_NOT_FOUND;
}
return 0;
@@ -114,8 +140,12 @@ static av_cold int omx_try_load(OMXContext *s, void *logctx,
static av_cold OMXContext *omx_init(void *logctx, const char *libname, const char *prefix)
{
static const char * const libnames[] = {
- "libOMX_Core.so",
- "libOmxCore.so",
+#if CONFIG_OMX_RPI
+ "/opt/vc/lib/libopenmaxil.so", "/opt/vc/lib/libbcm_host.so",
+#else
+ "libOMX_Core.so", NULL,
+ "libOmxCore.so", NULL,
+#endif
NULL
};
const char* const* nameptr;
@@ -126,14 +156,14 @@ static av_cold OMXContext *omx_init(void *logctx, const char *libname, const cha
if (!omx_context)
return NULL;
if (libname) {
- ret = omx_try_load(omx_context, logctx, libname, prefix);
+ ret = omx_try_load(omx_context, logctx, libname, prefix, NULL);
if (ret < 0) {
av_free(omx_context);
return NULL;
}
} else {
- for (nameptr = libnames; *nameptr; nameptr++)
- if (!(ret = omx_try_load(omx_context, logctx, *nameptr, prefix)))
+ for (nameptr = libnames; *nameptr; nameptr += 2)
+ if (!(ret = omx_try_load(omx_context, logctx, nameptr[0], prefix, nameptr[1])))
break;
if (!*nameptr) {
av_free(omx_context);
@@ -141,6 +171,8 @@ static av_cold OMXContext *omx_init(void *logctx, const char *libname, const cha
}
}
+ if (omx_context->host_init)
+ omx_context->host_init();
omx_context->ptr_Init();
return omx_context;
}
@@ -298,6 +330,12 @@ static av_cold int find_component(OMXContext *omx_context, void *logctx,
char **components;
int ret = 0;
+#if CONFIG_OMX_RPI
+ if (av_strstart(role, "video_encoder.", NULL)) {
+ av_strlcpy(str, "OMX.broadcom.video_encode", str_size);
+ return 0;
+ }
+#endif
omx_context->ptr_GetComponentsOfRole((OMX_STRING) role, &num, NULL);
if (!num) {
av_log(logctx, AV_LOG_WARNING, "No component for role %s found\n", role);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index abe3847..bd506fd 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 41
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
======================================================================
diff --cc Changelog
index 8c8978b,a497fbc..46f0ecb
--- a/Changelog
+++ b/Changelog
@@@ -2,203 -2,17 +2,203 @@@ Entries are sorted chronologically fro
releases are sorted from youngest to oldest.
version <next>:
-- aliases and defaults for Ogg subtypes (opus, spx)
-- HEVC/H.265 RTP payload format (draft v6) packetizer and depacketizer
-- avplay now exits by default at the end of playback
-- XCB-based screen-grabber
-- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
-- H.261 RTP payload format (RFC 4587) depacketizer and experimental packetizer
+- DXVA2-accelerated HEVC Main10 decoding
+- fieldhint filter
+- loop video filter and aloop audio filter
+- Bob Weaver deinterlacing filter
+- firequalizer filter
+- datascope filter
+- bench and abench filters
+- ciescope filter
+- protocol blacklisting API
+- MediaCodec H264 decoding
+- VC-2 HQ RTP payload format (draft v1) depacketizer and packetizer
+- AudioToolbox audio decoders
+- AudioToolbox audio encoders
+- coreimage filter (GPU based image filtering on OSX)
+- libdcadec removed
+- bitstream filter for extracting DTS core
+- ADPCM IMA DAT4 decoder
+- musx demuxer
+- aix demuxer
+- remap filter
+- hash and framehash muxers
+- colorspace filter
+- hdcd filter
+- readvitc filter
+- VAAPI-accelerated format conversion and scaling
+- libnpp/CUDA-accelerated format conversion and scaling
+- Duck TrueMotion 2.0 Real Time decoder
+- Wideband Single-bit Data (WSD) demuxer
+- VAAPI-accelerated H.264/HEVC/MJPEG encoding
+- DTS Express (LBR) decoder
- - Generic OpenMAX IL encoder
++- Generic OpenMAX IL encoder with support for Raspberry Pi
+
+version 3.0:
+- Common Encryption (CENC) MP4 encoding and decoding support
+- DXV decoding
+- extrastereo filter
+- ocr filter
+- alimiter filter
+- stereowiden filter
+- stereotools filter
+- rubberband filter
+- tremolo filter
+- agate filter
+- chromakey filter
+- maskedmerge filter
+- Screenpresso SPV1 decoding
+- chromaprint fingerprinting muxer
+- ffplay dynamic volume control
+- displace filter
+- selectivecolor filter
+- extensive native AAC encoder improvements and removal of experimental flag
+- ADPCM PSX decoder
+- 3dostr, dcstr, fsb, genh, vag, xvag, ads, msf, svag & vpk demuxer
+- zscale filter
+- wve demuxer
+- zero-copy Intel QSV transcoding in ffmpeg
+- shuffleframes filter
+- SDX2 DPCM decoder
+- vibrato filter
+- innoHeim/Rsupport Screen Capture Codec decoder
+- ADPCM AICA decoder
+- Interplay ACM demuxer and audio decoder
+- XMA1 & XMA2 decoder
+- realtime filter
+- anoisesrc audio filter source
+- IVR demuxer
+- compensationdelay filter
+- acompressor filter
+- support encoding 16-bit RLE SGI images
+- apulsator filter
+- sidechaingate audio filter
+- mipsdspr1 option has been renamed to mipsdsp
+- aemphasis filter
+- mips32r5 option has been removed
+- mips64r6 option has been removed
+- DXVA2-accelerated VP9 decoding
+- SOFAlizer: virtual binaural acoustics filter
+- VAAPI VP9 hwaccel
+- audio high-order multiband parametric equalizer
+- automatic bitstream filtering
+- showspectrumpic filter
+- libstagefright support removed
+- spectrumsynth filter
+- ahistogram filter
+- only seek with the right mouse button in ffplay
+- toggle full screen when double-clicking with the left mouse button in ffplay
+- afftfilt filter
+- convolution filter
+- libquvi support removed
+- support for dvaudio in wav and avi
+- libaacplus and libvo-aacenc support removed
+- Cineform HD decoder
+- new DCA decoder with full support for DTS-HD extensions
+- significant performance improvements in Windows Television (WTV) demuxer
+- nnedi deinterlacer
+- streamselect video and astreamselect audio filter
+- swaprect filter
+- metadata video and ametadata audio filter
+- SMPTE VC-2 HQ profile support for the Dirac decoder
+- SMPTE VC-2 native encoder supporting the HQ profile
+
+
+version 2.8:
+- colorkey video filter
+- BFSTM/BCSTM demuxer
+- little-endian ADPCM_THP decoder
+- Hap decoder and encoder
+- DirectDraw Surface image/texture decoder
+- ssim filter
+- optional new ASF demuxer
+- showvolume filter
+- Many improvements to the JPEG 2000 decoder
+- Go2Meeting decoding support
+- adrawgraph audio and drawgraph video filter
+- removegrain video filter
+- Intel QSV-accelerated MPEG-2 video and HEVC encoding
+- Intel QSV-accelerated MPEG-2 video and HEVC decoding
+- Intel QSV-accelerated VC-1 video decoding
+- libkvazaar HEVC encoder
+- erosion, dilation, deflate and inflate video filters
+- Dynamic Audio Normalizer as dynaudnorm filter
+- Reverse video and areverse audio filter
+- Random filter
+- deband filter
+- AAC fixed-point decoding
+- sidechaincompress audio filter
+- bitstream filter for converting HEVC from MP4 to Annex B
+- acrossfade audio filter
+- allyuv and allrgb video sources
+- atadenoise video filter
+- OS X VideoToolbox support
+- aphasemeter filter
+- showfreqs filter
+- vectorscope filter
+- waveform filter
+- hstack and vstack filter
+- Support DNx100 (1440x1080 at 8)
+- VAAPI hevc hwaccel
+- VDPAU hevc hwaccel
+- framerate filter
+- Switched default encoders for webm to VP9 and Opus
+- Removed experimental flag from the JPEG 2000 encoder
+
+
+version 2.7:
+- FFT video filter
+- TDSC decoder
+- DTS lossless extension (XLL) decoding (not lossless, disabled by default)
+- showwavespic filter
+- DTS decoding through libdcadec
+- Drop support for nvenc API before 5.0
+- nvenc HEVC encoder
+- Detelecine filter
+- Intel QSV-accelerated H.264 encoding
+- MMAL-accelerated H.264 decoding
+- basic APNG encoder and muxer with default extension "apng"
+- unpack DivX-style packed B-frames in MPEG-4 bitstream filter
+- WebM Live Chunk Muxer
+- nvenc level and tier options
+- chorus filter
+- Canopus HQ/HQA decoder
+- Automatically rotate videos based on metadata in ffmpeg
+- improved Quickdraw compatibility
+- VP9 high bit-depth and extended colorspaces decoding support
+- WebPAnimEncoder API when available for encoding and muxing WebP
+- Direct3D11-accelerated decoding
+- Support Secure Transport
+- Multipart JPEG demuxer
+
+
+version 2.6:
+- nvenc encoder
+- 10bit spp filter
+- colorlevels filter
+- RIFX format for *.wav files
- RTP/mpegts muxer
-- VP8 in Ogg demuxing
+- non continuous cache protocol support
+- tblend filter
+- cropdetect support for non 8bpp, absolute (if limit >= 1) and relative (if limit < 1.0) threshold
+- Camellia symmetric block cipher
- OpenH264 encoder wrapper
+- VOC seeking support
+- Closed caption Decoder
+- fspp, uspp, pp7 MPlayer postprocessing filters ported to native filters
+- showpalette filter
+- Twofish symmetric block cipher
- Support DNx100 (960x720 at 8)
-- Direct3D11-accelerated decoding
+- eq2 filter ported from libmpcodecs as eq filter
+- removed libmpcodecs
+- Changed default DNxHD colour range in QuickTime .mov derivatives to mpeg range
+- ported softpulldown filter from libmpcodecs as repeatfields filter
+- dcshift filter
+- RTP depacketizer for loss tolerant payload format for MP3 audio (RFC 5219)
+- RTP depacketizer for AC3 payload format (RFC 4184)
+- palettegen and paletteuse filters
+- VP9 RTP payload format (draft 0) experimental depacketizer
+- RTP depacketizer for DV (RFC 6469)
- DXVA2-accelerated HEVC decoding
- AAC ELD 480 decoding
- Intel QSV-accelerated H.264 decoding
diff --cc configure
index e093e63,2eb686a..9a986ac
--- a/configure
+++ b/configure
@@@ -160,8 -143,9 +160,9 @@@ Hardware-accelerated decoding/encoding
--enable-cuda enable dynamically linked CUDA [no]
--enable-libmfx enable HW acceleration through libmfx
--enable-mmal enable decoding via MMAL [no]
- --enable-nvenc enable encoding via NVENC [no]
+ --enable-nvenc enable NVIDIA NVENC support [no]
--enable-omx enable encoding via OpenMAX IL [no]
+ --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi [no]
Individual component options:
--disable-everything disable all components listed below
@@@ -1540,18 -1257,10 +1541,19 @@@ EXTERNAL_LIBRARY_LIST=
zlib
"
+DOCUMENT_LIST="
+ doc
+ htmlpages
+ manpages
+ podpages
+ txtpages
+"
+
FEATURE_LIST="
+ ftrapv
gray
hardcoded_tables
+ omx_rpi
runtime_cpudetect
safe_bitstream_reader
shared
@@@ -5704,39 -4623,23 +5706,44 @@@ enabled mmal && { check_li
check_lib interface/mmal/mmal.h mmal_port_connect ; }
check_lib interface/mmal/mmal.h mmal_port_connect ; } ||
die "ERROR: mmal not found"; }
+enabled mmal &&
+ (check_code cc interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS" ||
+ die "ERROR: mmal firmware headers too old")
+
+enabled netcdf && require_pkg_config netcdf netcdf.h nc_inq_libvers
+enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } &&
+ { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" ||
+ die "ERROR: NVENC API version 5 or older is not supported"; } &&
+ { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
+enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
+ check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
+ die "ERROR: openal not found"; } &&
+ { check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
+ die "ERROR: openal must be installed and version must be 1.1 or compatible"; }
+enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
+ check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
+ die "ERROR: opencl not found"; } &&
+ { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
+ check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
+ die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
+enabled opengl && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
+ check_lib2 windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
+ check_lib2 OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
+ check_lib2 ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
+ die "ERROR: opengl not found."
+ }
+ enabled omx_rpi && enable omx
+ enabled omx && { check_header OMX_Core.h ||
+ { ! enabled cross_compile && enabled omx_rpi && {
+ add_cflags -isystem/opt/vc/include/IL ; }
+ check_header OMX_Core.h ; } ||
+ die "ERROR: OpenMAX IL headers not found"; }
-enabled openssl && { check_pkg_config openssl openssl/ssl.h SSL_library_init && {
- add_cflags $openssl_cflags && add_extralibs $openssl_libs; }||
+enabled openssl && { use_pkg_config openssl openssl/ssl.h SSL_library_init ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl not found"; }
- enabled omx && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
-
-if enabled gnutls; then
- { check_lib2 gmp.h mpz_export -lgmp && enable gmp; } ||
- { check_lib gcrypt.h gcry_mpi_new -lgcrypt && enable gcrypt; }
-fi
+enabled qtkit_indev && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; }
# libdc1394 check
if enabled libdc1394; then
diff --cc libavcodec/version.h
index abe3847,71515a9..bd506fd
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@@ -27,9 -27,9 +27,9 @@@
#include "libavutil/version.h"
-#define LIBAVCODEC_VERSION_MAJOR 57
-#define LIBAVCODEC_VERSION_MINOR 18
-#define LIBAVCODEC_VERSION_MICRO 1
+#define LIBAVCODEC_VERSION_MAJOR 57
+#define LIBAVCODEC_VERSION_MINOR 41
- #define LIBAVCODEC_VERSION_MICRO 100
++#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list