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

📄 fbm_sw.h

📁 tuner扫描
💻 H
📖 第 1 页 / 共 3 页
字号:
/*==========================================================================*/
/*     (Copyright (C) 2003 Koninklijke Philips Electronics N.V.             */
/*     All rights reserved.                                                 */
/*     This source code and any compilation or derivative thereof is the    */
/*     proprietary information of Koninklijke Philips Electronics N.V.      */
/*     and is confidential in nature.                                       */
/*     Under no circumstances is this software to be exposed to or placed   */
/*     under an Open Source License of any type without the expressed       */
/*     written permission of Koninklijke Philips Electronics N.V.           */
/*==========================================================================*/
/*==========================================================================*/
/*                                                                          
       SOURCE_FILE:    $RCSfile: fbm_sw.h,v $
       APPLICATION:                                                         
       PACKAGE:        Video Output  
       COMPONENT:      MPEG Video       
       VERSION:        $Revision: 1.10 $
       DATE:           $Date: 1998/09/28 14:17:34 $
                                                                            
       (C) 1997: Philips Export B.V.                                  
                                                                            
       All rights are reserved. Reproduction in whole or in part is         
       prohibited without the prior written consent of the copyright        
       owner. The information presented in this document does not           
       form part of any quotation or contract, is believed to be            
       accurate and reliable and may be changed without notice.             
       No liability will be accepted by the publisher for any               
       consequence of its use. Publication thereof does not convey          
       nor imply any license under patent- or other industrial or           
       intellectual property rights.                                        
*/                                                                          
/*==========================================================================*/

#ifndef _FBM_SW_INCLUDED
#define _FBM_SW_INCLUDED

#ifdef __cplusplus
extern "C" {
#endif

/*==========================================================================*/
/*       I N C L U D E S                                                    */ 
/*==========================================================================*/
# include "mv_drv.h"
# include "disp_io.h"
# include "mv_dec.h"
# include "ipvd_dbgl.h"

/*==========================================================================*/
/*        G L O B A L   D A T A   D E C L A R A T I O N S                   */
/*==========================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM error code
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Error codes returned by the FBM functions
                     
    DEFINITION:      
*/

#define MV_FBM_NOT_OK 0
#define MV_FBM_OK 1

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         MV_FBM_CHANGE_CHANNEL_TIME_OUT_VS
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       When a change channel is requested, if no new
                       picture has been detected after 
		       MV_FBM_CHANGE_CHANNEL_TIME_OUT_VS, the stream is
		       considered to be stopped (display in recovery mode)
		       and FBM returns to the caller, ready to restart
		       on I picture.
                     
    DEFINITION:      
*/

#define  MV_FBM_CHANGE_CHANNEL_TIME_OUT_VS 4

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM_DEC_DELAY_THRESHOLD_[IP/B]
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Threshold used to take decision if there is any delay
                       in the decoding (unit: percentage)
                     
    DEFINITION:      
*/

#define FBM_DEC_DELAY_THRESHOLD_IP 65
#define FBM_DEC_DELAY_THRESHOLD_B  80

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM_LAUNCH_DECODING_enum
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       input parameter of MV_FBM_launch_decoding
                       
                     
    DEFINITION:      
*/

typedef enum
{
  FBM_LAUNCH_DECODING_NOW,
  FBM_LAUNCH_DECODING_AT_END_OF_DECODING
}FBM_LAUNCH_DECODING_enum ;

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM error concealment 
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       defines masks for error concealment
                       
                     
    DEFINITION:      
*/
#define   MV_FBM_VECT_ERROR          (0x0010)
#define   MV_FBM_VLC_MB_ERROR        (0x0080)
#define   MV_FBM_VLC_EOB_MISS_ERROR  (0x0100)
#define   MV_FBM_VLC_COEF_ERROR      (0x0200)
#define   MV_FBM_LOW_FLAGED_ERROR    (0x0400)
#define   MV_FBM_MEDIUM_FLAGED_ERROR (0x0800)
#define   MV_FBM_HIGH_FLAGED_ERROR   (0x1000)
/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM frame store identifier 
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       identifier of the frames stores in the frame store 
                       addresses array
                              
    DEFINITION:      
*/

typedef enum
{
  FS0 = 0,
  FS1,
  FS2,
  FS3,
  FRAME_STORE_FOR_DECODE_NEXT_PICTURE_FCT,
  FRAME_STORE_FOR_DISPLAY_PICTURE_FCT,
  FRAME_STORE_FOR_DECODE_PICTURE_IN_PICTURE_FCT,
  FRAME_STORE_NB_MAX,
  FS0_FS1,
  FS1_FS2,
  FS0_FS2,
  FBM_ANY_FS,
  FBM_NO_FS
} MV_FBM_FRAME_STORE;

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM_FIELD_1ST_2ND
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       identify the field (first, second or any) displayed
                              
    DEFINITION:      
*/

typedef enum
{
  FBM_FIELD_1ST  = 1,
  FBM_FIELD_2ST,
  FBM_FIELD_1ST_2ND_ANY
} FBM_FIELD_1ST_2ND;

/*EMP=======================================================================*/
/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM gop structure 
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Stores information about gop
                              
    DEFINITION:      
*/
typedef struct
{
  MV_BIT                   closed_gop;
  MV_BIT                   broken_link;
} FBM_GOP;

/*EMP=======================================================================*/

/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM picture address 
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       store the full location of a picture
                              
    DEFINITION:      
*/
typedef struct
{
  ULONG                 storing_y_odd_ptr;
  ULONG                 storing_y_even_ptr;
  ULONG                 storing_c_odd_ptr;
  ULONG                 storing_c_even_ptr;
} FBM_PICT_ADD;

/*EMP=======================================================================*/

/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM Vs enum
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Qualify the Vs
                              
    DEFINITION:      
*/

typedef enum
{
  VS_NO_DECODE,
  VS_CHECK_NO_DECODE,
  VS_DECODE,
  VS_CHECK_AND_DECODE,
  VS_NO_DECODE_3_2_PULLDOWN,
  VS_CHECK_AND_DECODE_3_2_PULLDOWN
} FBM_VS;

/*EMP=======================================================================*/

/*MDP=======================================================================*/
/*  
    ITEM NAME:         
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       
    
    Switch to FBM_STATE_DEC_STARTED when the first picture is displayed

    At initialization, the state is FBM_STATE_DEC_STOPPED
    At a change channel, the state is switched to FBM_STATE_DEC_STOPPED (until
    the first picture is displayed)

                              
    DEFINITION:      
*/

typedef enum
{
  FBM_STATE_DEC_STARTED, 
  FBM_STATE_DEC_STOPPED
} FBM_STATE;

/*EMP=======================================================================*/

/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM picture
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Stores information about picture
                              
    DEFINITION:      
*/

typedef struct
{
   /* Flag for valid information */

   BOOLEAN                       info_valid;

  /* BITSTR info */
   MV_TEMPORAL_REFERENCE        temporal_reference;
   MV_PICTURE_CODING_TYPE       picture_coding_type;
   MV_T10BITS                   vbv_delay;
   MV_PICTURE_STRUCTURE         picture_structure;
   MV_BIT                       top_field_first;
   MV_BIT                       repeat_first_field;
   MV_BIT                       progressive_frame;
   MV_DEC_DTS                   pict_pts;
   /* CR CFR_BSS#937 : handle low_delay streams */
   MV_BIT                       low_delay;

   DISP_DRV_INFO                disp_drv_info;

   /* Decoding context info */

   MV_FBM_FRAME_STORE            frame_store;
   MV_TAB_LABEL                 tab_label;
   MV_STORING_FORMAT            storing_format;
   BOOLEAN                       use_storing_top;
   BOOLEAN                       use_storing_bottom;
   ULONG                         picture_number;
   BOOLEAN                       decoding_finished;

   /* display context info */

   DISP_IN_FIELD_MODE            displayed_field;
   BOOLEAN                       new_frame;

   BOOLEAN                       field_top_still_to_display_flag;
   BOOLEAN                       field_bot_still_to_display_flag;

   BOOLEAN                       field_top_data_deallocated_after_display;
   BOOLEAN                       field_bot_data_deallocated_after_display;

   DISP_FILTER_INFO              disp_filter_info;

} FBM_PICTURE;

/*EMP=======================================================================*/

/*MDP=======================================================================*/
/*  
    ITEM NAME:         FBM STATUS
                       
    PACKAGE:           MV_FBM
    DESCRIPTION:       Contains the FBM package status information
                              
    DEFINITION:      
*/
typedef struct
{

  /******************************/
  /*   'environement variables' */
  /******************************/
#ifdef _OSA_FBM_TEST_BENCH_
  INIT_struct           *p_init;
  FILE                  *fbm_log;
#endif

  /***********************/
  /*   Working variables */
  /***********************/
  
  BOOLEAN               change_channel_requested;
  BOOLEAN               soft_reset_requested;
  BOOLEAN               dec_to_disp_N1;
  MV_DEC_FREEZE_MODE    freeze_mode_requested;

  /* Variables for decoding */

  ULONG                 picture_number;
  BOOLEAN               waiting_for_sync;
  BOOLEAN               waiting_for_eopd;
  BOOLEAN               video_in_sync;
  BOOLEAN               picture_under_decoding;
  MV_TAB_LABEL         last_tab_label_used;
  BOOLEAN               decode_P_possible;
  BOOLEAN               decode_B_possible;
  BOOLEAN               trick_mode_broken_link;
  BOOLEAN               I_or_GI_P_found_after_trick_mode_broken_link;
  BOOLEAN               decode_as_soon_as_in_sync;
  UCHAR                 toggle_24hz;
  UCHAR                 top_field_first_24hz;
  BOOLEAN               picture_discarded_since_last_in_sync;
  BOOLEAN               start_decoding_before_in_sync_processed;

  /* Decoding: picture controlled */
  BOOLEAN               dec_picture_controlled;
  BOOLEAN               decode_next_picture_request;

  /* Low delay */
  BOOLEAN               low_delay_display_programmed;

  /* PR903 : 50 -> 60Hz conversion */
   BOOLEAN              prepare_2vs_frozen;               
   BOOLEAN              next_B_picture_frozen_2vs;               
   BOOLEAN              run_normal_vs_algoritm;
   ULONG                vs_counter;
   
  /* Scan - Freeze - step */
  MV_DEC_STEP_MODE      step_status;
  MV_PICTURE_STRUCTURE  step_picture_structure_mode;
  BOOLEAN               step_required;
  MV_DEC_SCAN_MODE      scan_status;
  MV_DEC_FREEZE_MODE    freeze_status;
  BOOLEAN               picture_found_for_freeze_flag;

   /* Variables for picture in picture decoding */

   BOOLEAN               pip_decoding_requested;
   BOOLEAN               pip_decoding_launched;
   BOOLEAN               pip_decoding_programmed;
   BOOLEAN               pip_waiting_for_in_sync;
   BOOLEAN               pip_waiting_for_eopd;
   BOOLEAN               pip_decoding_terminated;
   BOOLEAN               pip_eoph_for_video_fifo_switch_back_occured;
   BOOLEAN               pip_ready_to_be_displayed;
   BOOLEAN               pip_discard_B_main_fifo;
   DISP_DRV_INFO         pip_disp_drv_info;
   
   

  /* Variables for display */

  /* picture_under_display and display_started:
     Display flags only used at the very start of the display. Afterwards,
     there should always be a picture under display, whatever happens    */ 
  BOOLEAN               picture_under_display;
  BOOLEAN               display_started;
#ifdef SA_PARITY_MISMATCH
   BOOLEAN              parity_mismatch;
   BOOLEAN              handling_parity_mismatch;
#endif
  BOOLEAN               recov_mode;
  BOOLEAN               recov_mode_N1;
  BOOLEAN               recov_mode_N2;

  UCHAR                 field_top_still_to_display_cnt;
  UCHAR                 field_bot_still_to_display_cnt;

  /* Decoding context */
  FBM_PICTURE           next_picture;
  FBM_PICTURE           cur_picture;
  FBM_PICTURE           next_future_picture;
  FBM_PICTURE           cur_future_picture;
  FBM_PICTURE           next_past_picture;
  FBM_PICTURE           cur_past_picture;

  /* Display context */
  FBM_PICTURE           next_displayed_picture;
  FBM_PICTURE           cur_displayed_picture;
  FBM_PICTURE           previous_displayed_picture;
  FBM_PICTURE           next_recov_picture;
  FBM_PICTURE           cur_recov_picture;

  FBM_PICTURE           next_displayed_picture_N1;
  FBM_PICTURE           cur_displayed_picture_N1;
  FBM_PICTURE           next_recov_picture_N1;

  FBM_PICTURE           next_displayed_picture_N2;
  FBM_PICTURE           next_recov_picture_N2;

⌨️ 快捷键说明

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