⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fbm_synchro_vs.c

📁 tuner扫描
💻 C
📖 第 1 页 / 共 5 页
字号:
                     ((p->step_status & 0x3) << 26) + \
                     ((p->step_picture_structure_mode & 0x3) << 24) + \
                     ((p->step_required & 0x1) << 23) + \
                     ((p->scan_status & 0x3) << 21) + \
                     ((p->freeze_status & 0x3) << 19) + \
                     ((p->picture_found_for_freeze_flag & 0x1) << 18) + \
                     ((p->picture_under_display & 0x1) << 17) + \
                     ((p->display_started & 0x1) << 16) + \
                     ((p->recov_mode & 0x1) << 15) + \
                     ((p->recov_mode_N1 & 0x1) << 14) + \
                     ((p->recov_mode_N2 & 0x1) << 13) + \
                     ((p->gop.closed_gop & 0x1) << 12) + \
                     ((p->gop.broken_link & 0x1) << 11) + \
                     ((p->Vs & 0x7) << 8) + \
                     ((p->next_Vs & 0x7) << 5) + \
                     ((p->fbm_state & 0x1) << 4));

         lv_info3 = (((p->field_top_still_to_display_cnt & 0xFF) << 16) + \
                     (p->field_bot_still_to_display_cnt & 0xFF));

         DV_DBG_STORE_EVENT(IPVD_DBG_EV_FBM_STATUS,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,lv_info0,lv_info1,lv_info2,lv_info3);

         MV_DEC_get_stc(&lv_info0);
#endif
         DV_DBG_STORE_EVENT(IPVD_DBG_EV_VSYNC,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,lv_info0,MV_drv_video_fifo_bfmu_cur(),MV_drv_video_fifo_rdpt_cur(),GV_Delta_VIDEO_DTS_PTS);

         /* we are in LOW DELAY mode */
         if((GV_MV_DEC_status.dec_low_delay_forced_by_application == TRUE) || (p->next_picture.low_delay == MV_BIT_ON))
         {
            /************************************************
             *!---------------------------------------------!*
             *!     displayed picture: current -> previous  !*
             *!                        next -> current      !*
             *!---------------------------------------------!*
             ************************************************/

             /* 
	     
                        /| |    /| |
                       / | |   / | |
                      /  | |  /  | |
                     /   | | /   | |
                  _________| ______|_______
                  previous  Vs  cur
             */

            /*--------------------------------------------!
            !   Update cur_displayed picture with next    !
            !--------------------------------------------*/
  
            p->previous_displayed_picture = p->cur_displayed_picture;
            p->cur_displayed_picture      = p->next_displayed_picture;
            p->cur_displayed_picture_N1   = p->next_displayed_picture_N1;
            p->cur_recov_picture          = p->next_recov_picture;

            /************************************************
             *!---------------------------------------------!*
             *! 	     FORCED BUFFER DE-ALLOCATION    !*
             *!---------------------------------------------!*
             ************************************************/
             /* 
	     
                    /| |    /|
                   / | |   / |
                  /  | |  /  |
                 /   | | /   |
              _________| _____________
             previous  Vs  cur
              */

            if(p->previous_displayed_picture.info_valid == TRUE)
            {
	      
               MV_FBM_forced_dealloc((const FBM_PICTURE*) &(p->previous_displayed_picture),
                                     (const FBM_PICTURE*) &(p->cur_displayed_picture)
                                     ); 
            } 

            /************************************************
            *!---------------------------------------------!*
            *! 	             BIT CHECK                    !*
            *!---------------------------------------------!*
            ************************************************/
           /* 
	     
                   /| |    /|
                  / | |   / |
                 /  | |  /  |
                /   | | /   |
             _________| _____________
                   Vs  cur
	  
	   Effect of the 'check' command:

	   If the decoded picture is stored in a frame zone and if the 
	   decoding pointer and the display pointer are the same, there is a control
	   mechanism preventing the decoding process to catch up the display process.
	   Note that this protection mechanism does not allow to display a picture
	   before it has been completely decoded.

	   The bit 'check' is set only when the first picture is available for the 
	   display. It ensures that the display and decoding pointers on which the
	   check is done are valid.

	   Remember that this command has an immediate effect (no double buffering).

	   */
	  	  
            MV_FBM_check(
               (const FBM_PICTURE *)&(p->cur_displayed_picture), 
               (const FBM_PICTURE *)&(p->cur_picture),
               (const BOOLEAN)       (p->display_started)
               );

           /*******************************************************************************
           *!----------------------------------------------------------------------------!*
           *! 	                DISPLAY: display info                                    !*
           *!----------------------------------------------------------------------------!*
           *******************************************************************************/

            /*--------------------------------------------------------------!
            ! If a field is under display, write end of display in log file !
            !--------------------------------------------------------------*/
  
            if(p->picture_under_display == TRUE)
            {
               /* Log Disp End event */
               DV_DBG_STORE_EVENT(IPVD_DBG_EV_FBM_DISP_END,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                                  p->previous_displayed_picture.frame_store,0,0,0);
               /* Disp TEXT */
               DV_DBG_STORE_EVENT( IPVD_DBG_EV_FBM_DISP_TEXT,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                                   p->previous_displayed_picture.picture_coding_type,
                                   p->previous_displayed_picture.temporal_reference,
                                   p->previous_displayed_picture.displayed_field,0);

            } /* End if(p->picture_under_display == TRUE) */


            /*-----------------------------------------------------------!
             ! 	If display_started is TRUE:                              !
             !-----------------------------------------------------------*/
  

           /* 
	     
                |    /| |    /|
                |   / | |   / |
                |  /  | |  /  |
                | /   | | /   |
             _________| ______|_______
                       Vs  cur   next
	       */

            if(p->display_started == TRUE)
            {
               /*--------------------------------------------!
                !   Set picture_under_display flag            !
        	!--------------------------------------------*/

               p->picture_under_display = TRUE;

               /*------------------------!
        	!   Log Disp Begin event  !
        	!------------------------*/
               DV_DBG_STORE_EVENT(IPVD_DBG_EV_FBM_DISP_BEGIN,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,0,0,0,0);
      
               /*-----------------------------------------------!
        	!   Log deallocation after display for B picture !
        	!-----------------------------------------------*/
               if(p->cur_displayed_picture.picture_coding_type==MV_PICTURE_CODING_TYPE_B)
               {
                  DV_DBG_STORE_EVENT( IPVD_DBG_EV_FBM_DEALLOC_AFTER_DISPLAY,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                                      p->cur_displayed_picture.field_top_data_deallocated_after_display,
                                      p->cur_displayed_picture.field_bot_data_deallocated_after_display,0,0);
               }
	  
            } /* End if p->display_started == TRUE) */

            /************************************************
           *!---------------------------------------------!*
           *! 	           DISPLAY algorithm              !*
           *!---------------------------------------------!*
           ************************************************/

          /* The algorithm for low delay is the following:
             When the decoding of a picture is finished, it is displayed at the next Vs.
             When a picture decoding is started, it is impossible to know in advance
             when the end of decoding is going to take place => a freeze has to be performed
             on the current displayed picture:
             If the current displayed picture is progressive, the displayed field can be toggled
             If the current displayed picture is interlaced, the first field has to be displayed
             once, then a freeze has to be performed on the second freeze. */

            /*---------------------------------------------------!
            !   Progressive  picture: toggle field               !
            !---------------------------------------------------*/

            if(p->cur_displayed_picture.progressive_frame == MV_BIT_ON)
            {
               MV_FBM_toggle_fields(
                  (const FBM_PICTURE *) &(p->cur_displayed_picture),
                  &(p->next_displayed_picture)
                  );
            } /* End progressive picture */

            /*----------------------!
            !   Interlaced picture  !
            !----------------------*/
            else
            {
               /*-------------------------------------------------------------!
                 ! Display first field once (programmed @ EOPD) => toggle field !
        	!-------------------------------------------------------------*/

               if( p->low_delay_display_programmed == TRUE)
               {
                  p->low_delay_display_programmed = FALSE;
                  MV_FBM_toggle_fields(
                     (const FBM_PICTURE *) &(p->cur_displayed_picture),
                     &(p->next_displayed_picture)
                     );
               } 

               /*-------------------------------------------------------------!
        	! Then keep displaying the 2nd field of the interlaced picture !
        	!-------------------------------------------------------------*/
               else
               {
                  /* Do nothing */
               }
	  
            } /* End interlaced picture */

            /************************************************
               *!---------------------------------------------!*
               *! 	     DISPLAY programming              !*
               *!---------------------------------------------!*
               ************************************************/

            /* a soft reset is requested */
            if (p->soft_reset_requested == TRUE)
            {
               MV_FBM_sw_reset();
               p->soft_reset_requested = FALSE;
            }
            
            p->next_displayed_picture.disp_drv_info.displayed_field = \
               p->next_displayed_picture.displayed_field;

            MV_FBM_program_display(
               &(p->next_displayed_picture),
               (const FBM_PICTURE *)&(p->next_recov_picture),
               (const ULONG *)      p->frame_store_y_odd_add,
               (const ULONG *)      p->frame_store_y_even_add,
               (const ULONG *)      p->frame_store_c_odd_add,
               (const ULONG *)      p->frame_store_c_even_add,
               &(p->next_displayed_picture.\
                 field_top_data_deallocated_after_display),
               &(p->next_displayed_picture.\
                 field_bot_data_deallocated_after_display)
               );

               if(p->change_channel_requested == TRUE)
               {
                  /* Decrement lv_change_channel_time_out_cnt */
                  lv_change_channel_time_out_cnt--;

                  if(lv_change_channel_time_out_cnt <= 0)
                  {
	      
                     p->change_channel_requested = FALSE;
                     p->fbm_state                = FBM_STATE_DEC_STOPPED;
                  
                     /* Make FBM start on new I picture */
                     MV_FBM_restart_on_I_after_channel_change(p);
	      

                     if (GV_MV_DEC_status.dec_event_enabled & MV_DEC_STOPPED_EVENT)
                     {
                        /* Notify the application. */
                        GV_MV_DEC_status.function_ptr(MV_DEC_STOPPED_EVENT);
                     }
                  } /* End TIME OUT in change channel */
               } /* End if(p->change_channel_requested == TRUE) */
         }
         else /* normal mode : NO LOW DELAY, End of if((GV_MV_DEC_status.dec_low_delay_forced_by_application == TRUE) || (p->next_picture.low_delay == MV_BIT_ON)) */
         {
          

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -