I would like to know which formula of PSNR is used in tf.image.psnr( a, b, max_val, name=None )

I found these PSNR formulae

PSNR(f,g)=10 log_10(〖255〗^2/MSE(f,g) )

PSNR(f,g)=10 log_10(〖MAX〗^2/MSE)

but I do not understand which kind of formula is used in tf.image.psnr function. Thanks in advance if you could explain me.