| 2208 | } |
| 2209 | |
| 2210 | static int read_qp_offset(GetBitContext *gb, int qp_off_type) |
| 2211 | { |
| 2212 | int val; |
| 2213 | |
| 2214 | switch (qp_off_type) { |
| 2215 | case 0: |
| 2216 | return 0; |
| 2217 | case 1: |
| 2218 | val = read_code012(gb); |
| 2219 | return val != 2 ? val : -1; |
| 2220 | default: |
| 2221 | if (!get_bits1(gb)) |
| 2222 | return 0; |
| 2223 | val = get_bits(gb, 2); |
| 2224 | if (!(val & 2)) |
| 2225 | return val + 1; |
| 2226 | else |
| 2227 | return -((val & 1) + 1); |
| 2228 | } |
| 2229 | } |
| 2230 | |
| 2231 | static int calc_sel_qp(int osvquant, int qp) |
| 2232 | { |
no test coverage detected