| 1200 | } |
| 1201 | |
| 1202 | void hb_rotate_geometry( hb_geometry_crop_t * geo, hb_geometry_crop_t * result, |
| 1203 | int angle, int hflip) |
| 1204 | { |
| 1205 | hb_geometry_crop_t in = *geo; // Make a copy in case geo aliases result |
| 1206 | *result = in; |
| 1207 | |
| 1208 | // re-orient result if needed |
| 1209 | hflip_crop_pad(result->crop, in.crop, hflip); |
| 1210 | hflip_crop_pad(result->pad, in.pad, hflip); |
| 1211 | if (angle == 90 || angle == 270) |
| 1212 | { |
| 1213 | result->geometry.width = in.geometry.height; |
| 1214 | result->geometry.height = in.geometry.width; |
| 1215 | result->geometry.par.num = in.geometry.par.den; |
| 1216 | result->geometry.par.den = in.geometry.par.num; |
| 1217 | } |
| 1218 | in = *result; |
| 1219 | rotate_crop_pad(result->crop, in.crop, angle); |
| 1220 | rotate_crop_pad(result->pad, in.pad, angle); |
| 1221 | } |
| 1222 | |
| 1223 | /** |
| 1224 | * Calculates destination width and height for anamorphic content |
no test coverage detected