Core Image CIAreaHistogram outputing erroneous values with CPU contexts.

Originator:raphael
Number:rdar://23234300 Date Originated:23-Oct-2015 02:58 PM
Status:Open Resolved:
Product:OS X SDK Product Version:10.11.1 (15B42)
Classification:Serious Bug Reproducible:Always
 
Please find attached sample code. It first create an image with 1/4 red coverage, 3/4 black. It then invokes CIAreaHistogram / CIAreaAverage with different context options (CPU / GPU)

The CPU output does not correspond to expected values, as shown in the log below. Multiple runs have different (indeterministic) values with CPU contexts.



2015-10-23 14:51:12.193 HistogramBug[2952:569547] =============================================================
2015-10-23 14:51:12.197 HistogramBug[2952:569547] **** CPU - Float ****
2015-10-23 14:51:12.235 HistogramBug[2952:569547] 	Histo pure red amount: 0.000000% / expected: 0.25%
2015-10-23 14:51:12.265 HistogramBug[2952:569547] 	Average red amount: 0.250140% / expected: 0.25%

2015-10-23 14:51:12.289 HistogramBug[2952:569547] **** CPU - Half Float ****
2015-10-23 14:51:12.325 HistogramBug[2952:569547] 	Histo pure red amount: 0.192968% / expected: 0.25%
2015-10-23 14:51:12.353 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:12.379 HistogramBug[2952:569547] **** GPU - Float ****
CIContext workingformat must be kCIFormatBGRA8, kCIFormatRGBA8, kCIFormatRGBAh or nil. Ignoring request for RGBAf.
2015-10-23 14:51:12.442 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:12.480 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:12.481 HistogramBug[2952:569547] **** GPU - Half Float ****
2015-10-23 14:51:12.493 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:12.499 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:13.566 HistogramBug[2952:569547] =============================================================
2015-10-23 14:51:13.568 HistogramBug[2952:569547] **** CPU - Float ****
2015-10-23 14:51:13.599 HistogramBug[2952:569547] 	Histo pure red amount: 0.000000% / expected: 0.25%
2015-10-23 14:51:13.630 HistogramBug[2952:569547] 	Average red amount: 0.250140% / expected: 0.25%

2015-10-23 14:51:13.657 HistogramBug[2952:569547] **** CPU - Half Float ****
2015-10-23 14:51:13.685 HistogramBug[2952:569547] 	Histo pure red amount: 0.241210% / expected: 0.25%
2015-10-23 14:51:13.713 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:13.739 HistogramBug[2952:569547] **** GPU - Float ****
CIContext workingformat must be kCIFormatBGRA8, kCIFormatRGBA8, kCIFormatRGBAh or nil. Ignoring request for RGBAf.
2015-10-23 14:51:13.768 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:13.809 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:13.809 HistogramBug[2952:569547] **** GPU - Half Float ****
2015-10-23 14:51:13.824 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:13.831 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:14.814 HistogramBug[2952:569547] =============================================================
2015-10-23 14:51:14.816 HistogramBug[2952:569547] **** CPU - Float ****
2015-10-23 14:51:14.848 HistogramBug[2952:569547] 	Histo pure red amount: 0.000000% / expected: 0.25%
2015-10-23 14:51:14.878 HistogramBug[2952:569547] 	Average red amount: 0.250140% / expected: 0.25%

2015-10-23 14:51:14.904 HistogramBug[2952:569547] **** CPU - Half Float ****
2015-10-23 14:51:14.932 HistogramBug[2952:569547] 	Histo pure red amount: 0.241687% / expected: 0.25%
2015-10-23 14:51:14.962 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:14.988 HistogramBug[2952:569547] **** GPU - Float ****
CIContext workingformat must be kCIFormatBGRA8, kCIFormatRGBA8, kCIFormatRGBAh or nil. Ignoring request for RGBAf.
2015-10-23 14:51:15.012 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:15.054 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

2015-10-23 14:51:15.054 HistogramBug[2952:569547] **** GPU - Half Float ****
2015-10-23 14:51:15.068 HistogramBug[2952:569547] 	Histo pure red amount: 0.243950% / expected: 0.25%
2015-10-23 14:51:15.074 HistogramBug[2952:569547] 	Average red amount: 0.249985% / expected: 0.25%

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!