[Bug 730783] bytereader: Improve the performance to find start code for H.264 and H.265

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 28 01:30:10 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=730783
  GStreamer | gstreamer (core) | git

--- Comment #6 from Sungho Bae <baver.bae at lge.com> 2014-05-28 08:30:08 UTC ---
(In reply to comment #1)
> The idea makes sense.
> 
> I'm not a neon expert, but isn't vceq.i8 checking for 0x00 (and not 0x0000) ?
> 

That's correct! vceq.i8 is to check for 0x00.
but, the previous instruction(vld2.8) is to load data using interleaved access
with 2 offset. 

it means the following:
inst: vld2.8 {d16-d19} [r1]
data: 0x   00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F ....
load: q8   00 02 04 06 08 0A 0C 0E  ......   (even indexed)
      q9   01 03 05 07 09 0B 0D 0F  ......   ( odd indexed)

The purpose of preprocessing using neon instructions is to skip noncandidates
which have two consecutive zeros.
In contrast, candidates for start code have two consecutive zeros and we have
to find 0x00 though it uses interleaved access (and not full access).

The above idea is to reduce the number of instructions in view of optimization.

> Furthermore, aren't there restrictions on alignments for the input 'pdata'
> variable ? Looks as though it would need to be 16-bit-aligned.

According to "ARM®Architecture Reference Manual for ARMv7-A and ARMv7-R edition
or ARMv8", neon load instruction 'vldn' supports unaligned access.

if you use vldn with alignment qualifiers or vldm (multiple load),
you can improve the performance but you should consider restrictions on
alignments for the input data.

in this patch, we do not use alignment qualifiers. it thus doesn't have to
consider restrictions on alignment. it always works.

> 
> In terms of code clarity, it would also be better if you could either:
> * avoid duplicating the code-paths and variables (i.e. just #if the new
> variables and asm path instead of duplicating everything).
> * or #if the whole function (i.e. add a new one instead of modifying the
> existing one).

I concur with your opinion.
After modify the patch, let you know it.

Thanks.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list