There is no single way to calculate IBP frames: they are always generated as trade-offs between the data carrying capacity of the channel and the computational capacity of the decoder.
Every frame can be treated as a key frame, if the data throughput is high enough (e.g., disc reading speed is high.)
There is no method to read the frames from a video and figure out from the decoded frames which of the frames were stored as key frames in the video -- not unless you have complete specification of the frame encoding algorithm (which would often be implementation-specific as there are a number of things which are parameters of the system rather than being fixed specifications.) There is no "marker" or "header" of any kind in the decoded frames as to how the frame was encoded on the video.
Best Answer