Message ID | bf4be08f.AUUAACKJBogAAAAAAAAAALF60VUAARpcY_sAAAAAAAeRJgBgJaZW@mailjet.com |
---|---|
Headers | show
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5DFAC44ADEB for <patchwork@ffaux-bg.ffmpeg.org>; Thu, 11 Feb 2021 23:49:18 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3222568AA85; Thu, 11 Feb 2021 23:49:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from o121.p8.mailjet.com (o121.p8.mailjet.com [87.253.233.121]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8636768AA6A for <ffmpeg-devel@ffmpeg.org>; Thu, 11 Feb 2021 23:49:11 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; q=dns/txt; d=viric.name; i=viric@viric.name; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe-post:list-unsubscribe: cc:feedback-id:x-csa-complaints:x-mj-mid:x-mj-smtpguid:x-report-abuse-to: content-type:content-transfer-encoding; bh=Cp1xmZSFiR59hq2lbYwSPEYXR5H8eV8GhHmngV9bK88=; b=SeuRlbdvAZqoFL7u+TXegUCSKCNb+QTqTKm5F+CqSR4i1sUFm28mbiDt5 OZ78KVERfx6Tz4F45/N21Dmf6Z1Y6fQxgqKG73xA7ktiWTQAiBL0E8chyRYm /weUy2LS0IJnB42cD8SayDJGzDBeXc5tvBxeUSoliL8sg2dcHuFi3g= Message-Id: <bf4be08f.AUUAACKJBogAAAAAAAAAALF60VUAARpcY_sAAAAAAAeRJgBgJaZW@mailjet.com> MIME-Version: 1.0 From: =?utf-8?q?Llu=C3=ADs_Batlle_i_Rossel?= <viric@viric.name> To: ffmpeg-devel@ffmpeg.org Date: Thu, 11 Feb 2021 22:48:18 +0100 List-Unsubscribe-Post: List-Unsubscribe=One-Click Feedback-Id: 42.495910.472369:MJ X-CSA-Complaints: csa-complaints@eco.de X-MJ-Mid: AUUAACKJBogAAAAAAAAAALF60VUAARpcY_sAAAAAAAeRJgBgJaZWx4UM5qX_QOqI0PBuC1t06AAHNTE X-MJ-SMTPGUID: c7850ce6-a5ff-40ea-88d0-f06e0b5b74e8 X-REPORT-ABUSE-TO: Message sent by Mailjet please report to abuse@mailjet.com with a copy of the message Subject: [FFmpeg-devel] [PATCH 0/3] mjpeg_mmal and avoid a frame copy in mmaldec X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: =?utf-8?q?Llu=C3=ADs_Batlle_i_Rossell?= <viric@viric.name> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
Series |
mjpeg_mmal and avoid a frame copy in mmaldec
|
expand
|
From: Lluís Batlle i Rossell <viric@viric.name> I needed to acquire mjpeg from a v4l2 uvc webcam in a Raspberry pi, and I saw mmaldec lacked mjpeg and also was doing an unnecessary copy. I used two patches I found in the mailing list archives to enable mjpeg mmaldec and then wrote one that avoids the copy. It works fine for me but I have not run 'fate' yet. I'm in a cross-building situation and I have yet to learn how that works. In a Raspberry Pi 1 Model B now it can 640x480 30fps mjpeg->h264_omx with 25% of cpu (as "top" shows). Before these three patches, 640x480 YUY2->h264_omx could do only 20fps and "top" showed 50% of cpu. A Raspberry Pi 2 can do easily 30fps 1280x720 mjpeg->h264_omx as well. It'd be a lot easier for me if these patches were upstream so I'm interested in the code getting in. I'm new in ffmpeg so I may have missed customary details. I also thank the help #ffmpeg-devel that made my patch (3rd) simpler than I originally thought. Cosmin Gorgovan (2): libavcodec/mmaldec: enable MJPEG decoding libavcodec/mmaldec: continue after receiving EOS without having sent one Lluís Batlle i Rossell (1): mmaldec with plain yuv420p without copy configure | 1 + libavcodec/allcodecs.c | 1 + libavcodec/mmaldec.c | 60 ++++++++++++++++++++++-------------------- 3 files changed, 34 insertions(+), 28 deletions(-)