A perceptual metric for blind measurement of blocking artifacts with applications in transform-block-based image and video codin