metal

Is this code drawing at the point or pixel level? How to draw retina pixels?

穿精又带淫゛_ 提交于 2019-11-26 17:05:46
问题 Consider this admirable script which draws a (circular) gradient, https://github.com/paiv/AngleGradientLayer/blob/master/AngleGradient/AngleGradientLayer.m int w = CGRectGetWidth(rect); int h = CGRectGetHeight(rect); and then angleGradient(data, w, h .. and the it loops over all those for (int y = 0; y < h; y++) for (int x = 0; x < w; x++) { basically setting the color *p++ = color; But wait - wouldn't this be working by points, not pixels ? How, really, would you draw to the physical pixels

Does H.264 encoded video with BT.709 matrix include any gamma adjustment?

霸气de小男生 提交于 2019-11-26 09:13:50
问题 I have read the BT.709 spec a number of times and the thing that is just not clear is should an encoded H.264 bitstream actually apply any gamma curve to the encoded data? Note the specific mention of a gamma like formula in the BT.709 spec. Apple provided examples of OpenGL or Metal shaders that read YUV data from CoreVideo provided buffers do not do any sort of gamma adjustment. YUV values are being read and processed as though they are simple linear values. I also examined the source code