r.setCompositingLayerCount(frames[0]);
int[] v = new int[1];
Kdu_params p = codestream.Access_siz().Access_cluster("COD");
if (p != null) {
p.Get(Kdu_global.Clayers, 0, 0, v, true, true, true);
if (v[0] > 0)
r.setQualityLayers(v[0]);
}
if (codestream.Exists())