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

📄 fbm_synchro_vs.c

📁 tuner扫描
💻 C
📖 第 1 页 / 共 5 页
字号:
                     MV_FBM_flag_trick_mode_broken_link(&(p->trick_mode_broken_link),
                                                        &(p->I_or_GI_P_found_after_trick_mode_broken_link));
                     GV_MV_DEC_status.dec_new_shc_decode_GI_P_possible = FALSE;
                  }
                  MV_FBM_discard_D(p);
               }
            } /* End Picture discarded */
         
         break;

      case FBM_MSG_VIDEO_IN_SYNC:

         /*------------------------!
         !       Log event         !
         !------------------------*/
         DV_DBG_STORE_EVENT( IPVD_DBG_EV_FBM_IN_SYNC,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                             p->next_picture.picture_coding_type,
                             p->next_picture.temporal_reference,0,0);

         /*--------------------------------------------------------------!
           ! 	Reset picture_discarded_since_last_in_sync flag         !
           !--------------------------------------------------------------*/
         p->picture_discarded_since_last_in_sync = FALSE;

         GV_MV_DEC_status.dec_pict_synchronized = FALSE;

         /* CR CFR_BSS#937 : handle low_delay streams */
         /* if low_delay bit is put in streams or GV_MV_DEC_status.dec_low_delay_forced_by_application is set */
         /* which means that application is doing still picture , LOW DELAY algoritm is applied : */
         /* display each picture without reordering each time a picture is decoded */
         /* (it will also avoid loading twice still picture in HPI Video now) */
         
         /* 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))
         {
            /*-------------------------------------!
              ! 	Set video_in_sync flag             !
             !-------------------------------------*/
            p->video_in_sync = TRUE;
            
            /**********************************************/
            /*         LOW DELAY: launch decoding         */
            /**********************************************/

            if(p->next_picture.info_valid == TRUE)
            {
               p->video_in_sync = FALSE;

               /*----------------------!
                 !    LAUNCH DECODING    !
                 !----------------------*/
               if(p->picture_under_decoding == TRUE)
               {
                  MV_FBM_launch_decoding(p,FBM_LAUNCH_DECODING_AT_END_OF_DECODING);
               }
               else
               {
                  MV_FBM_launch_decoding(p,FBM_LAUNCH_DECODING_NOW);
               }
		  
               /*-------------------------------------!
                 !   Set picture_under_decoding flag    !
                 !-------------------------------------*/
               p->picture_under_decoding = TRUE;

               /*---------------------------!
                 !   Log start decoding event !
                 !---------------------------*/
               DV_DBG_STORE_EVENT( IPVD_DBG_EV_FBM_DEC_BEGIN,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                                   p->next_picture.picture_coding_type,
                                   p->next_picture.temporal_reference,0,0);

            } /* End if(p->next_picture.info_valid == 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)) */
         {
            if((p->pip_decoding_launched  == TRUE)
               ||(p->pip_waiting_for_in_sync == TRUE))
            {
               DV_DBG_STORE_EVENT(IPVD_DBG_EV_PIP,IPVD_DBG_PIP_LEVEL,IPVD_IN_SYNC_ISR,0,0,0);

               if(p->pip_decoding_programmed == FALSE)
               {
                  MV_FBM_decode_pip_on_eopd(p);
                  DV_DBG_STORE_EVENT(IPVD_DBG_EV_PIP,IPVD_DBG_PIP_LEVEL,IPVD_DEC_BEGIN,0,0,0);
               }
              
               p->pip_waiting_for_in_sync = FALSE;
               p->pip_decoding_launched  = FALSE;
               p->pip_decoding_programmed = TRUE;
               p->pip_waiting_for_eopd = TRUE;
               break;
            }
         
            /*-----------------------------------------!
              ! 	Set video_in_sync flag             !
              !-----------------------------------------*/

            if(p->start_decoding_before_in_sync_processed == FALSE)
            {
               p->video_in_sync = TRUE;
            }
            else
            {
               /* Start decoding already applied for this picture: Reset flag */
               p->start_decoding_before_in_sync_processed = FALSE;
            }
         
            /*----------------------------------------------------------------------!
              !      If flag decode_as_soon_as_in_sync is set, launch the decoding    !
              !      (at end of picture decoding)                                     !
              !----------------------------------------------------------------------*/

            if(p->decode_as_soon_as_in_sync == TRUE)
            {
               p->decode_as_soon_as_in_sync = FALSE;

               lv_decoding_launched = FALSE;
	      
               if(p->next_picture.info_valid == TRUE)
               {

                  p->video_in_sync = FALSE;

                  lv_decoding_launched = TRUE;

                  /*----------------------!
                    !    LAUNCH DECODING    !
                    !----------------------*/

                  MV_FBM_launch_decoding(p,FBM_LAUNCH_DECODING_AT_END_OF_DECODING);
		  
                  /*-------------------------------------!
                    !   Set picture_under_decoding flag    !
                    !-------------------------------------*/

                  p->picture_under_decoding = TRUE;

                  /*---------------------------!
                    !   Log start decoding event !
                    !---------------------------*/
                  DV_DBG_STORE_EVENT(IPVD_DBG_EV_FBM_DEC_BEGIN,IPVD_DBG_MAJOR_BEHAVIOR_LEVEL,
                                     p->next_picture.picture_coding_type,p->next_picture.temporal_reference,0,0);

               } /* End if(p->next_picture.info_valid == TRUE)*/

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

               /* Restore The N1 display context */  
               p->next_displayed_picture_N1 = lv_next_displayed_picture_N1_backup;
               p->next_recov_picture_N1     = lv_next_recov_picture_N1_backup;


               MV_FBM_play_display_algo(
                  (const BOOLEAN) lv_decoding_launched,
                  (const FBM_PICTURE *) (&(p->cur_picture)), 
                  (const FBM_PICTURE *) (&(p->cur_future_picture)), 
                  (const FBM_PICTURE *) (&(p->cur_past_picture)), 
                  (const FBM_PICTURE *) (&(p->cur_displayed_picture_N1)),
                  &(p->next_displayed_picture_N1),
                  &(p->next_recov_picture_N1),
                  &(p->recov_mode_N1),
                  &(p->field_top_still_to_display_cnt),
                  &(p->field_bot_still_to_display_cnt),
                  p->step_status,
                  p->dec_to_disp_N1,
                  &(p->prepare_2vs_frozen),
                  &(p->next_B_picture_frozen_2vs)
                  );

              
               if(p->dec_to_disp_N1 == TRUE)
                  /*------------------------!
                    !         N1              !
                    !------------------------*/
               {
                  p->next_displayed_picture    = p->next_displayed_picture_N1;
                  p->next_recov_picture        = p->next_recov_picture_N1;
                  p->recov_mode                = p->recov_mode_N1;
               } /* End N1 */
            
               else
                  /*------------------------!
                    !         N2              !
                    !------------------------*/
               {
                  p->next_displayed_picture_N2 = p->next_displayed_picture_N1;
                  p->next_recov_picture_N2     = p->next_recov_picture_N1;
                  p->recov_mode_N2             = p->recov_mode_N1;
               } /* End N2 */

               /* Now next_displayed_picture and next_recov_picture are set */

               /*------------------------------------------------------------------------------*/

               if(p->display_started == FALSE)
               {
                  if((p->next_displayed_picture.info_valid == TRUE)&&
                     (p->recov_mode == FALSE)&&
                     ((p->dec_picture_controlled == FALSE) || (p->step_status != MV_DEC_STEP_MODE_NONE)))
                     /* In step mode we are under decoding controlled by the application, but display should
                        run normaly */
                  {
                     p->display_started = TRUE;
                  }
               }

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

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

               if(p->display_started == TRUE)
               {

                  /* If the current FBM state is FBM_STATE_DEC_STOPPED and recov_mode is FALSE, 
                     it means that the first pictureis going to be displayed => switch to 
                     FBM_STATE_DEC_STARTED */

                  if((p->fbm_state == FBM_STATE_DEC_STOPPED) && (p->recov_mode == FALSE))
                  {
                     p->fbm_state = FBM_STATE_DEC_STARTED ;
                  }
               } /* End if(p->display_started == TRUE) */

            } /* End decode_as_soon_as_in_sync TRUE */

            /************************************************
             *!---------------------------------------------!*
             *! 	 POSITION VS VALUE FOR NEXT VS            !*
             *!---------------------------------------------!*
             ************************************************/

	    /*---------------------------------------------!
              !  Position the Vs value for next Vs           !
              !---------------------------------------------*/

            MV_FBM_set_next_Vs(
               (const BOOLEAN)               p->dec_picture_controlled,
               (const BOOLEAN)               p->decode_next_picture_request,
               (const FBM_VS )               p->Vs,
               (const BOOLEAN)               lv_decoding_launched,
               (const MV_PICTURE_STRUCTURE) p->cur_picture.picture_structure,
               (const MV_BIT)               p->next_displayed_picture_N1.repeat_first_field,
               &(p->next_Vs)
               );
         }
         
         break;

      case FBM_MSG_VS:
           /*------------------------!
           ! 	Log Vs event          !
           !------------------------*/
#ifdef DV_DEBUG
         lv_info0 = p->picture_number;

         lv_info1 = (((p->change_channel_requested & 0x1) << 31) + \
                     ((p->soft_reset_requested & 0x1) << 30) + \
                     ((p->dec_to_disp_N1 & 0x1) << 29) + \
                     ((p->freeze_mode_requested & 0x3) << 27) + \
                     ((p->waiting_for_sync & 0x1) << 26) + \
                     ((p->waiting_for_eopd & 0x1) << 25) + \
                     ((p->video_in_sync & 0x1) << 24) + \
                     ((p->picture_under_decoding & 0x1) << 23) + \
                     ((p->last_tab_label_used & 0x1) << 22) + \
                     ((p->decode_P_possible & 0x1) << 21) + \
                     ((p->decode_B_possible & 0x1) << 20) + \
                     ((p->trick_mode_broken_link & 0x1) << 19) + \
                     ((p->I_or_GI_P_found_after_trick_mode_broken_link & 0x1) << 18) + \
                     ((p->decode_as_soon_as_in_sync & 0x1) << 17) + \
                     ((p->toggle_24hz & 0xFF) << 9) + \
                     ((p->top_field_first_24hz & 0xFF) << 1) + \
                     (p->picture_discarded_since_last_in_sync & 0x1));

         lv_info2 = (((p->start_decoding_before_in_sync_processed & 0x1) << 31) + \
                     ((p->dec_picture_controlled & 0x1) << 30) + \
                     ((p->decode_next_picture_request & 0x1) << 29) + \
                     ((p->low_delay_display_programmed & 0x1) << 28) + \

⌨️ 快捷键说明

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