[ARM] [NEON] port libvpx (VP8 and VP9) to support aarch64 architecture.

800 views
Skip to first unread message

James Yu

unread,
Mar 14, 2014, 2:56:39 AM3/14/14
to codec...@webmproject.org, Tom Gall, James Elliott, Guillaume Letellier, Zhou (Joe) Yu, Vivien Kuan, Mollie Wu
Hi,

Below are all ARM NOEN assembler rewrite to Intrinsics patches. It will enable libvpx to support compiled by aarch64 toolchain and running on ARMv8 platform. 
There is no aarch64 real SoC available for test, but it should okay to run on it.

Please refer to patches 
VP8

VP8 encoder

VP9

VPX scale

And add configure for support ARMv8 64bits
But not yet running on a real ARMv8 silicon.


Benchmark result

I got some interesting decode result of running on Cortex-A7 and A8.

CodecEnvironmentNEON AssemblyNEON intrinsics
VP8Cortex-A8, 0.8GHz13.23 fps11.97 fps
 Cortex-A7, 1GHz13.54 fps12.33 fps
VP9Cortex-A8, 0.8GHz8.40 fps7.64 fps
 Cortex-A7, 1GHz7.76 fps8.20 fps

There is benchmark result for each patch in commit msg. I didn't list here.

VP8 decode performance

1. Both assembly and intrinsics have better result when running on Cortex-A7.
2. Also have around 9% performance loss almost same as on Cortex-A8.

VP9 decode performance

1. Intrinsics has better performance than assembly on Cortex-A7.
2. While using assembly, Cortex-A8 has better performance than Cortex-A7.
3. But using intrinsics, 
Cortex-A7 has better performance than Cortex-A8.

I've no idea the reason why have this result. Could anybody help?

If you have any question. Please let me know. :-)

Best Regards,
-James

neeluf...@gmail.com

unread,
Dec 8, 2014, 7:41:21 AM12/8/14
to codec...@webmproject.org, tom....@linaro.org, james....@linaro.org, Guillaume...@arm.com, Joe...@arm.com, vivie...@linaro.org, moll...@linaro.org, jame...@linaro.org
I have used the Noen intrinsics patches as you have mentioned below but still I am not able to built the VP8 for 64bit iOS using Xcode 6.1. So please let me know what else changes we need to do for running Vp8 on arm64 iOS.
Also I wanted to know which --target i need to set when configuring.

Thanks in Advance.

Regards,
Neelu

Johann Koenig

unread,
Dec 8, 2014, 1:41:47 PM12/8/14
to codec...@webmproject.org, Tom Gall, james....@linaro.org, Guillaume...@arm.com, Joe...@arm.com, Vivien Kuan, Mollie Wu, James Yu
Please have a look at the build/make/iosbuild.sh script and let me know if you still have issues.

All the vp8 patches have been accepted and merged into the library. You can use the latest git. I am working on reviewing the vp9 patches.

--
You received this message because you are subscribed to the Google Groups "Codec Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codec-devel...@webmproject.org.
To post to this group, send email to codec...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/codec-devel/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

Neelufar kamil

unread,
Dec 9, 2014, 5:16:49 AM12/9/14
to codec...@webmproject.org
Hi Johann,

Thanks for you reply. Now I was able to build Vp8 for arm64 on iOS.

Regards,
Neelufar

--
You received this message because you are subscribed to a topic in the Google Groups "Codec Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/a/webmproject.org/d/topic/codec-devel/nsKm9xsQD6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codec-devel...@webmproject.org.

Neelufar kamil

unread,
Dec 12, 2014, 8:07:54 AM12/12/14
to codec...@webmproject.org
Hi Johann,

I was able to build the vpx frame work for iOS using the iosbuild.sh which is provided with lipvpx folder. 
Also I have edited the .sh to include --enable-error-concealment.
But when I set flag = VPX_CODEC_USE_ERROR_CONCEALMENT to vpx_codec_dec_init API I am getting error code as 4 where as thing is working fine when I directly use the code without framework.
Also if I set falg = 0 to vpx_codec_dec_init with vpx framework decoder is working fine.
So can I know why this difference is coming when we are using source code and vpx framework and also let know how to have decoder with error concealment with vpx framework.

Thanks in advance

Regards,
Neelu

Johann Koenig

unread,
Dec 12, 2014, 1:47:53 PM12/12/14
to codec...@webmproject.org
On Fri, Dec 12, 2014 at 5:07 AM, Neelufar kamil <neeluf...@gmail.com> wrote:
I was able to build the vpx frame work for iOS using the iosbuild.sh which is provided with lipvpx folder. 
Also I have edited the .sh to include --enable-error-concealment.

You can also add the option by passing --extra-configure-args="--enable-error-concealment"

Are you rebuilding/updating the library after running configure? You may be accidentally using the previously built version.

Neelufar kamil

unread,
Dec 14, 2014, 11:37:57 PM12/14/14
to codec...@webmproject.org
I have added option for including error concealment and also in vpx_configure.h the error concealment macro is enabled.
But still I am getting error while initializing decoder and the error code returned is 4.

I have downloaded libpvx from github and then configured it using the isobuild.sh and using these vpx framework without rebuilding or updating library. Anyway I will recheck this once again.

Regards,
Neelufar


--

Neelufar kamil

unread,
Dec 15, 2014, 8:48:24 AM12/15/14
to codec...@webmproject.org
once again I downloaded lipvpx from 

git clone http://git.chromium.org/webm/libvpx.git

Then configured this using the below command

../build/make/iosbuild.sh --extra-configure-args --enable-error-concealment --enable-realtime-only

And also in the vpx_config.h file i have below macros.

#define CONFIG_ERROR_CONCEALMENT 1

#define CONFIG_REALTIME_ONLY 1

but still when i try below i am getting error.

    vpx_codec_flags_t  flags = VPX_CODEC_USE_ERROR_CONCEALMENT;  

    codec_params = (vpx_codec_ctx_t *)calloc(1, sizeof(vpx_codec_ctx_t));

    iface = vpx_codec_vp8_dx();

    err_code = vpx_codec_dec_init(codec_params, iface, NULL, 0);

Here I am getting error code as 4.

I am using Xcode 6.1 and testing these on iPad mini 32bit(arm7) and iPad mini 64bit(arm64).

Regards,

Neelufar



Johann Koenig

unread,
Dec 18, 2014, 8:38:46 PM12/18/14
to codec...@webmproject.org
On Mon, Dec 15, 2014 at 5:48 AM, Neelufar kamil <neeluf...@gmail.com> wrote:
> Here I am getting error code as 4.

That is the error code for "VPX_CODEC_INCAPABLE" so it still suggests
that it isn't being built. Does this file get built:
vp8/decoder/error_concealment.c:

If you examine your output binary do you see any of the following
functions from it:
vp8_alloc_overlap_lists
vp8_de_alloc_overlap_lists
vp8_calculate_overlaps
vp8_estimate_missing_mvs
vp8_interpolate_motion
vp8_conceal_corrupt_mb

I uploaded a quick test which passes on my android arm builds:
https://gerrit.chromium.org/gerrit/73324

Neelufar kamil

unread,
Dec 20, 2014, 8:05:03 AM12/20/14
to codec...@webmproject.org
I could see that vp8/decoder/error_concealment.c is getting built and also the binary is having the above functions.
To check if the binary is having these function I used the VPX file which is present in the framework folder and used command nm -gU and below was what I got on terminal

/Users/dsp_video/Desktop/vp8_64bit_git/vpx_frame_wrok/ofi_vp8_with_framework/2014-12-20(ofi_vc_decoder_test)/xcode/Videomonet_IOS/source/vp8_codec/libvpx/framework/VPX.framework/VPX(error_concealment.c.o):

0000000000000e88 s EH_frame0

0000000000000d80 s _interpolate_mvs.neigh_pos

0000000000000000 T _vp8_alloc_overlap_lists

0000000000000ea0 S _vp8_alloc_overlap_lists.eh

0000000000000090 T _vp8_calculate_overlaps

0000000000000ef0 S _vp8_calculate_overlaps.eh

0000000000000d70 T _vp8_conceal_corrupt_mb

0000000000000f80 S _vp8_conceal_corrupt_mb.eh

0000000000000060 T _vp8_de_alloc_overlap_lists

0000000000000ec8 S _vp8_de_alloc_overlap_lists.eh

0000000000000470 T _vp8_estimate_missing_mvs

0000000000000f20 S _vp8_estimate_missing_mvs.eh

0000000000000970 T _vp8_interpolate_motion

0000000000000f50 S _vp8_interpolate_motion.eh

0000000000000e20 s _weights_q7


And I am not sure how to test the decode_api_test.cc if you let me know how to test these file then I will do the same and get back to you.

Thanks in advance.

Regards,

Neelufar


Johann Koenig

unread,
Jan 6, 2015, 12:14:06 PM1/6/15
to codec...@webmproject.org
Unfortunately I'm not sure how to run the gtest code on iOS. It seems
very strange that you're able to find the symbols and everything else
appears to line up correctly. My best guess is still that there are
some stale files left over that the build is picking up and which
don't have error concealment enabled.
> You received this message because you are subscribed to the Google Groups
> "Codec Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
Reply all
Reply to author
Forward
0 new messages