[FFmpeg-cvslog] avcodec/omx: ensure zerocopy mode can be disabled on rpi builds
Aman Gupta
git at videolan.org
Sat Aug 24 03:12:05 EEST 2019
ffmpeg | branch: release/4.2 | Aman Gupta <aman at tmm1.net> | Thu Aug 22 11:02:45 2019 -0700| [e008f89cfa1aa88204f720cac227a2c29bf57da4] | committer: Aman Gupta
avcodec/omx: ensure zerocopy mode can be disabled on rpi builds
fixes https://trac.ffmpeg.org/ticket/6586
Signed-off-by: Aman Gupta <aman at tmm1.net>
(cherry picked from commit 23a3e1460a7a609651bfe75b7b4c428eaa8f3902)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e008f89cfa1aa88204f720cac227a2c29bf57da4
---
libavcodec/omx.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libavcodec/omx.c b/libavcodec/omx.c
index a1e5a46a54..3128abd5ec 100644
--- a/libavcodec/omx.c
+++ b/libavcodec/omx.c
@@ -644,10 +644,6 @@ static av_cold int omx_encode_init(AVCodecContext *avctx)
OMX_BUFFERHEADERTYPE *buffer;
OMX_ERRORTYPE err;
-#if CONFIG_OMX_RPI
- s->input_zerocopy = 1;
-#endif
-
s->omx_context = omx_init(avctx, s->libname, s->libprefix);
if (!s->omx_context)
return AVERROR_ENCODER_NOT_FOUND;
@@ -913,7 +909,7 @@ static av_cold int omx_encode_end(AVCodecContext *avctx)
static const AVOption options[] = {
{ "omx_libname", "OpenMAX library name", OFFSET(libname), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VDE },
{ "omx_libprefix", "OpenMAX library prefix", OFFSET(libprefix), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VDE },
- { "zerocopy", "Try to avoid copying input frames if possible", OFFSET(input_zerocopy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
+ { "zerocopy", "Try to avoid copying input frames if possible", OFFSET(input_zerocopy), AV_OPT_TYPE_INT, { .i64 = CONFIG_OMX_RPI }, 0, 1, VE },
{ "profile", "Set the encoding profile", OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = FF_PROFILE_UNKNOWN }, FF_PROFILE_UNKNOWN, FF_PROFILE_H264_HIGH, VE, "profile" },
{ "baseline", "", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_H264_BASELINE }, 0, 0, VE, "profile" },
{ "main", "", 0, AV_OPT_TYPE_CONST, { .i64 = FF_PROFILE_H264_MAIN }, 0, 0, VE, "profile" },
More information about the ffmpeg-cvslog
mailing list