MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_rotate_geometry

Function hb_rotate_geometry

libhb/hb.c:1202–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1200}
1201
1202void 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

Callers 6

rpu_workFunction · 0.85
ghb_set_scale_settingsFunction · 0.85
ghb_set_title_settingsFunction · 0.85
rotate_changed_cbFunction · 0.85

Calls 2

hflip_crop_padFunction · 0.85
rotate_crop_padFunction · 0.85

Tested by

no test coverage detected