#This work is licensed under the
#Creative Commons Attribution-Share Alike 3.0 United States License.
#To view a copy of this license, visit
#http://creativecommons.org/licenses/by-sa/3.0/us/ or send a letter to
#Creative Commons,
#171 Second Street, Suite 300,
#San Francisco, California, 94105, USA.

INPUT "stream's bits-per-sample";
OUTPUT "encoded bits-per-sample as 3 bit value";
VAR bits_per_sample "bits-per-sample";
switch bits_per_sample {
case {8} {return 1;}
case {12} {return 2;}
case {16} {return 4;}
case {20} {return 5;}
case {24} {return 6;}
default {return 0;}
}
