| 228 | } |
| 229 | |
| 230 | static inline int hb_image_width(int pix_fmt, int width, int plane) |
| 231 | { |
| 232 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); |
| 233 | |
| 234 | if (desc != NULL && (plane == 1 || plane == 2)) |
| 235 | { |
| 236 | // The wacky arithmetic assures rounding up. |
| 237 | width = -((-width) >> desc->log2_chroma_w); |
| 238 | } |
| 239 | |
| 240 | return width; |
| 241 | } |
| 242 | |
| 243 | static inline int hb_image_height(int pix_fmt, int height, int plane) |
| 244 | { |
no outgoing calls
no test coverage detected