SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The following shows the block diagram of the Film Mode Detection (FMD) module:
Film Mode Detection calculates four parameters which are used in conjuction with software to determine if the source of the video is film (3:2 or 2:2 sequences). This block is not part of the main data path, but calculates statistics based on the main data path for each frame generated, then interrupts the processor to read the information and then set to '1' the VPE_DEI_REG10[1] FMD_LOCK (lock to film mode) and VPE_DEI_REG10[2] FMD_JAM_DIR (direction of field jam) registers, to set the design to film mode operation.
All of the calculations are performed within a window defined by VPE_DEI_REG8[10:0] FMD_WINDOW_MINX, VPE_DEI_REG8[26:16] FMD_WINDOW_MAXX, VPE_DEI_REG9[10:0] FMD_WINDOW_MINY, VPE_DEI_REG9[26:16] FMD_WINDOW_MAXY. All calculations are reset on each new input frame.
Field difference is calculated as the absolute difference (absdiff) between the current Luma input and the previous field Luma input. Value can be read on VPE_DEI_REG13[27:0] FMD_FIELD_DIFF register. Frame difference is calculated using the motion input from the MDT. Value can be read on VPE_DEI_REG14[19:0] FMD_FRAME_DIFF register. Figure 10-14 is showing how these are calculated is shown below:
Value of FMD_WINDOW_MAXX must be less then WIDTH and value of FMD_WINDOW_MAXY must be less then ½ HEIGHT.
Combing Artifacts value is calculated as shown in Figure 10-15. Value can be read on VPE_DEI_REG12[20:0] FMD_CAF register.
FMD_RESET is set to tell software when the Film Mode Detection should be unlocked back to normal operation. The logic controlling this is based on the caf output, and is set based on caf being above a threshold set by VPE_DEI_REG11[19:0] FMD_CAF_THR and where within the window the current x/y position is. If the position is over ¾ in height, and caf > FMD_CAF_THR OR if over ½ in height and caf > ¾*FMD_CAF_THR OR if over ¼ in height and caf > ¼*FMD_CAF_THR, then VPE_DEI_REG12[24] FMD_RESET must be set (it will clear at the start of the next field input).
The Film Mode Interrupt (fmd_int) will be generated at the end of the window defined for FMD operation and tells software to read the above parameters. When the interrupt fires, the above parameters are latched into the DEI Control Interface (MMR) so they can be read.