Re: Re: [linux-sunxi] How to adjust bitrate of allwinner's encoder dynamically

2015-05-05 Thread jonsm...@gmail.com
On Tue, May 5, 2015 at 12:00 AM, kevin.z.m...@gmail.com
kevin.z.m...@gmail.com wrote:

 On 2015-04-29 at 21:20, jonsm...@gmail.com jonsm...@gmail.com wrote:
On Tue, Apr 28, 2015 at 10:37 PM, kevin.z.m...@gmail.com
kevin.z.m...@gmail.com wrote:
 Hi,

 The encoder allows you to set the MaxQp(0~51), MinQp(0~51), and
 MaxBitrate

 parameters. MaxQp and MinQp are used to controlpicture quality and
 MaxBitrate

 is used to clamp the maximum encoding bit rate within the bitrate
 statistical

 time;

 The default configuration is MinQp = 10; MaxQp = 40. If you could not get

 it to work for lower bitrates , please try to change MaxQp to a bigger
 value,

The bitrate setting on an h.264 encoder is supposed to take precedence
and be a hard limit. So if I set 500Kb/sec the encoder has to adjust
everything else until it can hit and hold that limit. Min/MaxQp should
not overrule the Bitrate limit. I believe the only exception to that
is for VBR where you are allowed to exceed the bandwidth limit by 10%
for short periods of time. The encoder is also supposed to be smart on
how it adjusts itself when the bandwidth limit is set.

These limits are there for streaming video. I needed to set a 500Kb/s
hard limit because I only had 500Kb/s of streaming capacity available.
I couldn't figure out how to keep the Allwinner encoder at a 500Kb/s
limit, it would stay at 500Kb/s for a while but then if there was
rapid motion it would jump to 2Mb/s. It should not matter if CBR or
VBR is set, the limit should still be enforced. Of course when it
jumped to 2Mb/s on my 500Kb/s pipe, the stream dropped.

 Nowadays, the limits of streaming video can't be controlled accurately
 with every frame, but an average in a period. On the A20 platform, it
 can't reach 500kb/s with 720p@30fps, the lowest value should be 1.5Mb/s.

That was an important bit of information that should have been in the
datasheet. It would have saved me a huge amount of time messing with
the A20 if I had known 500Kb was never going to be possible.



Check out the the software x86 h.264 implementations - they will
output exactly 500Kb/s when told to. You can watch the picture become
very clear when the scene is still and then go grainy when there is
rapid motion.

Also - I had severe problems with noise on A20 cameras. That noise is
random from frame to frame. Encoding that noise wastes all of my
500Kb/s bandwidth which makes the image quality terrible. Typical
some type of ISP is used to remove this noise before h.264 encoding.

 There may be 3 main factors causing noise, they are lens, Sensor and
 ISP. A20 has none local ISP, selecting an external ISP may reduce the
 noise. Besides ISP, the lens and Sensor is important too, and the NT99141
 is recommended.

Does the Allwinner V3 support external I2S? I'd just look in the
datasheet, but it is too much hassle to get it.
 Yes, V3 can support external IIS.
 We will make the documents for v3 ready as soon as possible.

Can the V3 hit 500Kb/s for h.264?

Currently we are using the Grain Media GM8138S. It is very nice with
the 128MB of DRAM in the same package. We also looked at the
Highsilicon Hi3518e but it gets way too hot. We use GM8138S with
2-channel I2S.

What we really need is:
1) 8-channel I2S
2) Camera that can do low noise, 720P or 1080P video at 500Kb/s (security video)
3) Runs Android
4) The unit is headless so no display
5) OpenCL on the GPU would be a bonus.

I have not found this combination is a low cost chip that works.



 
 Best Regards,
 kevin.z.m




-- 
Jon Smirl
jonsm...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] mainline musb

2015-05-05 Thread Michal Suchanek
Hello,

is there some branch on which musb is supposed to work?

I tried to transplant the musb bindings to a few boards and I get the
init function running for rather long time for doing nothing with no
messages logged and no new bus added.

Thanks

Michal

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 1/2] drivers: soc: sunxi: sram: add debug prints.

2015-05-05 Thread Maxime Ripard
This patch has not been sent to the proper mailing lists

On Sun, May 03, 2015 at 08:43:04PM +0100, Michal Suchanek wrote:
 Log messages about claimed sram.

... lacks a meaningful commit log ...

 
 Signed-off-by: Michal Suchanek hramr...@gmail.com
 ---
  drivers/soc/sunxi/sunxi_sram.c | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
 index 5b76fd1..f2bce8e 100644
 --- a/drivers/soc/sunxi/sunxi_sram.c
 +++ b/drivers/soc/sunxi/sunxi_sram.c
 @@ -35,6 +35,8 @@ struct sunxi_sram_desc {
   boolenabled;
  };
  
 +static struct device *dev;
 +
  #define SUNXI_SRAM_MAP(_val, _func)  \
   {   \
   .func = _func,  \
 @@ -127,11 +129,13 @@ int sunxi_sram_claim(enum sunxi_sram_type type, const 
 char *function)
  
   if (sram-claimed) {
   spin_unlock(sram_lock);
 + dev_warn(dev, Sram %s already claimed.\n, sram-name 
 );

... and has some checkpatch errors.

You should seriously consider reading Documentation/SubmittingPatches.

(and I think it could even be logged as an error.)

   return -EBUSY;
   }
  
   sram-claimed = true;
   spin_unlock(sram_lock);
 + dev_dbg(dev, Claiming sram %s for %s.\n, sram-name, function 
 );
  
   for (func = sram-func; func-func; func++) {
   if (strcmp(function, func-func))
 @@ -164,6 +168,7 @@ int sunxi_sram_release(enum sunxi_sram_type type)
   spin_lock(sram_lock);
   sram-claimed = false;
   spin_unlock(sram_lock);
 + dev_dbg(dev, Releasing sram %s.\n, sram-name );

SRAM is an acronym, it should be written uppercase.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 2/2] drivers: soc: sunxi: sram: fix offset in sram claim.

2015-05-05 Thread Maxime Ripard
On Sun, May 03, 2015 at 09:44:43PM +0200, Michal Suchanek wrote:
 The value written to the register was not shifted by the offset leading
 to sram being claimed incorrectly.
 
 Signed-off-by: Michal Suchanek hramr...@gmail.com

Squashed into the commit (with the proper checkpatch fixes).

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 0/2] sun4i spi dma support

2015-05-05 Thread Hans de Goede

Hi,

On 04-05-15 21:39, Michal Suchanek wrote:

On 4 May 2015 at 21:17, Hans de Goede hdego...@redhat.com wrote:

Hi,

On 04-05-15 19:52, Michal Suchanek wrote:


Hello,

the sunxi spi controller driver still lacks dma support.

The dmaengine patch is queued in sunxi-wip so please add the spi dma as
well.



Are you talking about the sunxi-wip branch in my personal git repo ?

That is in no way an official branches and patches being in there mean
pretty much nothing other then that I'm playing around with them.

Please do not use my sunxi-wip branch to base any patches you post for
upstream on, nor report official bugs when using my sunxi-wip branch.



So is the dmaengine going to get anywhere


I added it to my sunxi-wip branch with the plan to push it upstream, but
I'm also very busy with sunxi u-boot stuff, so Maxime has agreed to take
over upstreaming this.

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] orange pi plus (Allwinner H3 based) has a Debian server image available since today

2015-05-05 Thread Nick Ludlam
On Sunday, 3 May 2015 23:03:08 UTC+1, ala...@gmail.com wrote:

 I have one of these H3 boards (Orange Pi Plus). 

 I have been able to build a working Linux kernel out of the source code at 
 https://github.com/allwinner-zh/linux-3.4-sunxi using sun8iw7p1. However 
 I could not get wired ethernet (GMAC + RTL PHY) or wireless (RTL8189ES) 
 working. 

 Is anyone working on mainline kernel support for H3? I can't code but 
 happy to help testing.


I've just received my Orange Pi Plus board today, and while I was 
downloading the Debian server image I noticed that they've released 
something called Linux SDK source code 
from http://www.orangepi.org/downloaded/download.html

It seems to be a tarball containing a top level directory named lichee/ 
which contains a 3.4 kernel tree, a buildroot tree, a uboot2011.09 tree and 
various tools. There's no git history, which makes creating a diff against 
whatever kernel version it's forked from a pain. 

I'm fairly well versed in building kernels and buildroot systems, but I'm 
not much more technical than that so I can't really do much with the SDK 
other than build what it produces.


-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.