Does being at high altitude may affect the throttle input in rise of quad?

rushimw:
So iterated lil bit changing the signs and finally got bit stable with this ones:

esc_1 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 1 (front-right - CCW)

esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 2 (rear-right - CW)
esc_3 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 3 (rear-left - CCW)
esc_4 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 4 (front-left - CW)

For a quadcopter in X configuration (as yours is), for each of the roll, pitch and yaw corrections, you will always add the correction to 2 motors, and subtract it from 2.
Here you are adding the roll and pitch correction to all motors.

This won't necessarily prevent your quad from lifting off but it will almost certainly prevent it from not crashing if you do manage to lift off.

EDIT: do you understand why you can't add the correction to all motors?