From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 0CE4BE00786; Tue, 23 Sep 2014 12:02:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 SPF_HELO_PASS SPF: HELO matches SPF record * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from ptmx.org (ptmx.org [178.63.28.110]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7EED8E0034C for ; Tue, 23 Sep 2014 12:02:04 -0700 (PDT) Received: from [192.168.178.14] (chello062178118086.5.14.vie.surfer.at [62.178.118.86]) by ptmx.org (Postfix) with ESMTPSA id 80CA72B584 for ; Tue, 23 Sep 2014 21:02:03 +0200 (CEST) Message-ID: <5421C3AB.2070400@pseudoterminal.org> Date: Tue, 23 Sep 2014 21:02:03 +0200 From: Carlos Rafael Giani User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: meta-freescale@yoctoproject.org References: <20140923181351.GA24931@netboy> <608A2425-9B3C-41F5-92A4-F3F408F8A683@tekmagic.net> <5421C23B.30803@habeyusa.com> In-Reply-To: <5421C23B.30803@habeyusa.com> Subject: Re: imx6: webkit html5 video with hardware acceleration X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2014 19:02:17 -0000 Content-Type: multipart/alternative; boundary="------------040300050401000304020709" --------------040300050401000304020709 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit This is because by default, WebKit will use GStreamer for decoding (and therefore automatically use hw accelerated decoding if an appropriate plugin is installed), but will copy the decoded pixels with the CPU. Efficient transmitting of decoded frames to the display is just as important as hw accelerated decoding, if not more. Yet, many people only care about the decoding part. On embedded platforms like the imx6, this means that zerocopy must be enforced, that is, ensure that _no_ copies of frames are made with the CPU. If copies are necessary, they must be done by using DMA transfers only. With stock WebKit, you can pretty much forget about that. Look at this source: https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp#L138 note how it copies pixels with the CPU. There is apparently a GL-based alternative, but I haven't seen it in action yet. Also, if TEXTURE_MAPPER_GL implies Desktop OpenGL (without being able to choose OpenGL ES instead), it means it will use the wrong API for embedded devices (*never* use the regular OpenGL, since it is made for desktops - use OpenGL ES instead). With OpenGL ES, there is a Vivante GPU specific extension that allows for zerocopy. But this has to be integrated into WebKit, which is probably rather difficult. On 2014-09-23 20:55, Bin Lin wrote: > Hi Richard, > > We tried to get the HTML5 playback working with Qt5.2.1 webkit on > daisy branch. It hangs when it is trying to play. We tried it on > both the youtubeview example of Qt5 webkitqml and the browser example > of webkitwidgets, eglfs setup. The results are the same. > > What are the steps you followed to make the HTML5 at least to play > under webkit? > > Regards, > > Bin > > On 9/23/2014 11:33 AM, Gerard Bucas wrote: >> Hi Richard >> >> We have trying EXACTLY the same thing & although we see a slight >> improvement on the latest beta BSP, I agree with your conclusion. >> >> This is a serious problem for practical applications of the I.MX6 - >> any application that requires HTML5 playback or a browser in general. >> >> See the thread to this list that I started yesterday: >> >> Re: [meta-freescale] Any hope of vblank-synchronized rendering (from >> vivante) on i.MX6 soon? >> >> Glad we have yet another concerned user!! 😃 >> >> Regards >> >> Gerard Bucas >> >> >> >>> On 23 Sep 2014, at 14:13, Richard Cochran >>> wrote: >>> >>> Dear list, >>> >>> I have been trying to get hardware accelerated html5 video working on >>> the imx6 for a some time now. After trying 'daisy' and also the more >>> recent alpha and beta branches, I have come to the conclusion that >>> this does not work (and never has). Looking at the webkit source and >>> also googling around only confirm my suspicions. >>> >>> Does anyone out there have this working? >>> >>> Thanks, >>> Richard >>> -- >>> _______________________________________________ >>> meta-freescale mailing list >>> meta-freescale@yoctoproject.org >>> https://lists.yoctoproject.org/listinfo/meta-freescale > --------------040300050401000304020709 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
This is because by default, WebKit will use GStreamer for decoding (and therefore automatically use hw accelerated decoding if an appropriate plugin is installed), but will copy the decoded pixels with the CPU. Efficient transmitting of decoded frames to the display is just as important as hw accelerated decoding, if not more. Yet, many people only care about the decoding part. On embedded platforms like the imx6, this means that zerocopy must be enforced, that is, ensure that _no_ copies of frames are made with the CPU. If copies are necessary, they must be done by using DMA transfers only.

With stock WebKit, you can pretty much forget about that. Look at this source: https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp#L138 note how it copies pixels with the CPU.

There is apparently a GL-based alternative, but I haven't seen it in action yet. Also, if TEXTURE_MAPPER_GL implies Desktop OpenGL (without being able to choose OpenGL ES instead), it means it will use the wrong API for embedded devices (*never* use the regular OpenGL, since it is made for desktops - use OpenGL ES instead). With OpenGL ES, there is a Vivante GPU specific extension that allows for zerocopy. But this has to be integrated into WebKit, which is probably rather difficult.

On 2014-09-23 20:55, Bin Lin wrote:
Hi Richard,

We tried to get the HTML5 playback working with Qt5.2.1 webkit on daisy branch.  It hangs when it is trying to play.  We tried it on both the youtubeview example of Qt5 webkitqml and the browser example of webkitwidgets, eglfs setup.  The results are the same.

What are the steps you followed to make the HTML5 at least to play under webkit?

Regards,

Bin

On 9/23/2014 11:33 AM, Gerard Bucas wrote:
Hi Richard

We have trying EXACTLY the same thing & although we see a slight improvement on the latest beta BSP, I agree with your conclusion.

This is a serious problem for practical applications of the I.MX6 - any application that requires HTML5 playback or a browser in general.

See the thread to this list that I started yesterday:

Re: [meta-freescale] Any hope of vblank-synchronized rendering (from vivante) on i.MX6 soon?

Glad we have yet another concerned user!! 😃

Regards

Gerard Bucas



On 23 Sep 2014, at 14:13, Richard Cochran <richardcochran@gmail.com> wrote:

Dear list,

I have been trying to get hardware accelerated html5 video working on
the imx6 for a some time now. After trying 'daisy' and also the more
recent alpha and beta branches, I have come to the conclusion that
this does not work (and never has). Looking at the webkit source and
also googling around only confirm my suspicions.

Does anyone out there have this working?

Thanks,
Richard
-- 
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale


--------------040300050401000304020709--