On 9/10/11 8:05 AM, Måns Rullgård wrote:
Luca Barbato<[email protected]>  writes:

On 8/26/11 3:33 AM, Måns Rullgård wrote:
"Ronald S. Bultje"<[email protected]>   writes:

From: "Ronald S. Bultje"<[email protected]>

   From 52.503s (~40fps) to 27.973sec (~80fps) decoding of 480p sintel
trailer, i.e. a ~2x speedup overall, on a Nexus S.

[...]

--- a/libavcodec/arm/asm.S
+++ b/libavcodec/arm/asm.S
@@ -97,6 +97,12 @@ T       add             \rn, \rn, \rm
   T       ldr             \rt, [\rn]
   .endm

+.macro  ldr_dpren       rt,  rn,  rm:vararg
+A       ldr             \rt, [\rn, -\rm]
+T       sub             \rt, \rn, \rm
+T       ldr             \rt, [\rt]
+.endm
+
   .macro  ldr_post        rt,  rn,  rm:vararg
   A       ldr             \rt, [\rn], \rm
   T       ldr             \rt, [\rn]
@@ -133,6 +139,12 @@ T       ldrh            \rt, [\rn]
   T       add             \rn, \rn, \rm
   .endm

+.macro  ldrb_post       rt,  rn,  rm
+A       ldrb            \rt, [\rn], \rm
+T       ldrb            \rt, [\rn]
+T       add             \rn, \rn, \rm
+.endm

Those macro names are very badly chosen.

ldrb_post seems in line with ldr_post. ldr_dpren named as ldr_dpre
seems equivalent to the other macros using sub. Which names you have
in mind?

I'm still trying to figure what "dpren" is supposed to denote.


I think ldr_dpre is the name. it follows the naming used for ldrh_dpre

is that ok?

+@ void vp8_luma_dc_wht(DCTELEM block[4][4][16], DCTELEM dc[16])
+function ff_vp8_luma_dc_wht_armv6, export=1
+        push           {r4 - r10, lr}

Please use whitespace consistent with other files, ignoring old files
using random whitespace.

which file should be used as template?

Anything written by me in the last couple of years, e.g. the vp8 files.

which files should be reformatted?

Everything written before 2008.

I'm having an hard time telling which should consider right. I'd use 4
spaces, 3*14 space and 4*4 space as column. but it isn't really used
everywhere.

I use 8 spaces initial indent to leave room for various tags (labels and
macros for conditional including) at the start of the line.  Operands
start at column 24 and (mostly) use 5 positions each (so 3-char reg
names line up vertically).  Instructions with more obscure operand
syntax are a bit random.

Then it is hard to align comments as you asked, some will go over 80 cols no matter what. I managed to keep everything within by shaving 8 cols as I said before, but you explained it can't be done always.

The TRMs on http://infocenter.arm.com/ have scheduling information.  As
long as you refuse to read the fine documentation, you will not be able
to write good code.

I guess that could go as in in the FAQ =)

A bit less space before the comments would make these lines fit in 80
columns.

using just 4 spaces indent would do?

See above.

Right.

I did not read the code in depth.  Might do if next round looks more
promising.

Since ronald is busy I'll try to help cleaning up.

Maybe I can allocate some work time to this.  I'll ask and let you know.

Perfect =)

lu


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to