the present disclosure is directed to a high power factor quasi resonant converter . the converter converts an ac power line input to a dc output to power a load , generally a string of leds . the power input is fed into a transformer being controlled by a power switch . the power switch is driven by a controller having a shaping circuit . the shaping circuit uses a current generator , switched resistor and capacitor to produce a sinusoidal reference voltage signal . the controller drives the power switch based on the voltage reference signal , resulting in a sinusoidal input current in a primary winding of the transformer , resulting in high power factor and low total harmonic distortion for the converter .