Minecraft wiki entry for Development_versions, associated text: Changed the way to calculate the input signal.
First, if there is an adjacent container behind, it detects the signal from the container. If not, it detects the signal from redstone components.
Then, if it is not less than 15, the detected signal becomes the input signal. Otherwise, it also gets a signal from item frame and container behind separated by a redstone conductor block from the comparator, and take the maximum of the three as the input signal.