Discard the alpha channel of the surface since it's not used. Always use MED_PERF for the AvcDecoder configuration because it now works well enough on Tegra 3 that the image quality improvements are worth it.

This commit is contained in:
Cameron Gutman 2013-11-21 08:45:25 -05:00
parent 45664dac2a
commit ab9b7b5164
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ public class Game extends Activity implements OnGenericMotionListener, OnTouchLi
sv.setOnTouchListener(this); sv.setOnTouchListener(this);
SurfaceHolder sh = sv.getHolder(); SurfaceHolder sh = sv.getHolder();
sh.setFixedSize(1280, 720); sh.setFixedSize(1280, 720);
sh.setFormat(PixelFormat.RGBA_8888); sh.setFormat(PixelFormat.RGBX_8888);
// Start the connection // Start the connection
conn = new NvConnection(Game.this.getIntent().getStringExtra("host"), Game.this, sv.getHolder().getSurface()); conn = new NvConnection(Game.this.getIntent().getStringExtra("host"), Game.this, sv.getHolder().getSurface());

View File

@ -73,7 +73,7 @@ public class CpuDecoderRenderer implements DecoderRenderer {
this.renderTarget = renderTarget; this.renderTarget = renderTarget;
this.perfLevel = findOptimalPerformanceLevel(); this.perfLevel = findOptimalPerformanceLevel();
int err = AvcDecoder.init(width, height, perfLevel); int err = AvcDecoder.init(width, height, MED_PERF);
if (err != 0) { if (err != 0) {
throw new IllegalStateException("AVC decoder initialization failure: "+err); throw new IllegalStateException("AVC decoder initialization failure: "+err);
} }