int c;
Kdu_coords ref_subs = new Kdu_coords();
Kdu_coords subs = new Kdu_coords();
codestream.Get_subsampling(reference_component, ref_subs);
Kdu_coords min_subs = new Kdu_coords();
min_subs.Assign(ref_subs);
for (c = 0; c < channels.Get_num_channels(); c++) {
codestream.Get_subsampling(channels.Get_source_component(c), subs);
if (subs.Get_x() < min_subs.Get_x()) {
min_subs.Set_x(subs.Get_x());