CARPLAY版本整理

This commit is contained in:
2025-01-21 16:49:37 +08:00
commit f0fb64e4e6
26542 changed files with 13719676 additions and 0 deletions

View File

@ -0,0 +1,699 @@
HWIF_DEC_PIC_INF,
HWIF_DEC_TIMEOUT,
HWIF_DEC_SLICE_INT,
HWIF_DEC_ERROR_INT,
HWIF_DEC_ASO_INT,
HWIF_DEC_BUFFER_INT,
HWIF_DEC_BUS_INT,
HWIF_DEC_RDY_INT,
HWIF_DEC_IRQ,
HWIF_DEC_IRQ_DIS,
HWIF_DEC_E,
HWIF_DEC_AXI_RD_ID,
HWIF_DEC_TIMEOUT_E,
HWIF_DEC_STRSWAP32_E,
HWIF_DEC_STRENDIAN_E,
HWIF_DEC_INSWAP32_E,
HWIF_DEC_OUTSWAP32_E,
HWIF_DEC_DATA_DISC_E,
HWIF_TILED_MODE_MSB,
HWIF_DEC_OUT_TILED_E,
HWIF_DEC_LATENCY,
HWIF_DEC_CLK_GATE_E,
HWIF_DEC_IN_ENDIAN,
HWIF_DEC_OUT_ENDIAN,
HWIF_PRIORITY_MODE,
HWIF_TILED_MODE_LSB,
HWIF_DEC_ADV_PRE_DIS,
HWIF_DEC_SCMD_DIS,
HWIF_DEC_MAX_BURST,
HWIF_DEC_MODE,
HWIF_RLC_MODE_E,
HWIF_SKIP_MODE,
HWIF_DIVX3_E,
HWIF_PJPEG_E,
HWIF_PIC_INTERLACE_E,
HWIF_PIC_FIELDMODE_E,
HWIF_PIC_B_E,
HWIF_PIC_INTER_E,
HWIF_PIC_TOPFIELD_E,
HWIF_FWD_INTERLACE_E,
HWIF_SORENSON_E,
HWIF_REF_TOPFIELD_E,
HWIF_DEC_OUT_DIS,
HWIF_FILTERING_DIS,
HWIF_MVC_E,
HWIF_PIC_FIXED_QUANT,
HWIF_WRITE_MVS_E,
HWIF_REFTOPFIRST_E,
HWIF_SEQ_MBAFF_E,
HWIF_PICORD_COUNT_E,
HWIF_DEC_AHB_HLOCK_E,
HWIF_DEC_AXI_WR_ID,
HWIF_PIC_MB_WIDTH,
HWIF_MB_WIDTH_OFF,
HWIF_PIC_MB_HEIGHT_P,
HWIF_MB_HEIGHT_OFF,
HWIF_ALT_SCAN_E,
HWIF_TOPFIELDFIRST_E,
HWIF_REF_FRAMES,
HWIF_PIC_MB_W_EXT,
HWIF_PIC_MB_H_EXT,
HWIF_PIC_REFER_FLAG,
HWIF_STRM_START_BIT,
HWIF_SYNC_MARKER_E,
HWIF_TYPE1_QUANT_E,
HWIF_CH_QP_OFFSET,
HWIF_CH_QP_OFFSET2,
HWIF_FIELDPIC_FLAG_E,
HWIF_INTRADC_VLC_THR,
HWIF_VOP_TIME_INCR,
HWIF_DQ_PROFILE,
HWIF_DQBI_LEVEL,
HWIF_RANGE_RED_FRM_E,
HWIF_FAST_UVMC_E,
HWIF_TRANSDCTAB,
HWIF_TRANSACFRM,
HWIF_TRANSACFRM2,
HWIF_MB_MODE_TAB,
HWIF_MVTAB,
HWIF_CBPTAB,
HWIF_2MV_BLK_PAT_TAB,
HWIF_4MV_BLK_PAT_TAB,
HWIF_QSCALE_TYPE,
HWIF_CON_MV_E,
HWIF_INTRA_DC_PREC,
HWIF_INTRA_VLC_TAB,
HWIF_FRAME_PRED_DCT,
HWIF_JPEG_QTABLES,
HWIF_JPEG_MODE,
HWIF_JPEG_FILRIGHT_E,
HWIF_JPEG_STREAM_ALL,
HWIF_CR_AC_VLCTABLE,
HWIF_CB_AC_VLCTABLE,
HWIF_CR_DC_VLCTABLE,
HWIF_CB_DC_VLCTABLE,
HWIF_CR_DC_VLCTABLE3,
HWIF_CB_DC_VLCTABLE3,
HWIF_STRM1_START_BIT,
HWIF_HUFFMAN_E,
HWIF_MULTISTREAM_E,
HWIF_BOOLEAN_VALUE,
HWIF_BOOLEAN_RANGE,
HWIF_ALPHA_OFFSET,
HWIF_BETA_OFFSET,
HWIF_START_CODE_E,
HWIF_INIT_QP,
HWIF_CH_8PIX_ILEAV_E,
HWIF_STREAM_LEN,
HWIF_CABAC_E,
HWIF_BLACKWHITE_E,
HWIF_DIR_8X8_INFER_E,
HWIF_WEIGHT_PRED_E,
HWIF_WEIGHT_BIPR_IDC,
HWIF_FRAMENUM_LEN,
HWIF_FRAMENUM,
HWIF_BITPLANE0_E,
HWIF_BITPLANE1_E,
HWIF_BITPLANE2_E,
HWIF_ALT_PQUANT,
HWIF_DQ_EDGES,
HWIF_TTMBF,
HWIF_PQINDEX,
HWIF_BILIN_MC_E,
HWIF_UNIQP_E,
HWIF_HALFQP_E,
HWIF_TTFRM,
HWIF_2ND_BYTE_EMUL_E,
HWIF_DQUANT_E,
HWIF_VC1_ADV_E,
HWIF_PJPEG_FILDOWN_E,
HWIF_PJPEG_WDIV8,
HWIF_PJPEG_HDIV8,
HWIF_PJPEG_AH,
HWIF_PJPEG_AL,
HWIF_PJPEG_SS,
HWIF_PJPEG_SE,
HWIF_DCT1_START_BIT,
HWIF_DCT2_START_BIT,
HWIF_CH_MV_RES,
HWIF_INIT_DC_MATCH0,
HWIF_INIT_DC_MATCH1,
HWIF_VP7_VERSION,
HWIF_CONST_INTRA_E,
HWIF_FILT_CTRL_PRES,
HWIF_RDPIC_CNT_PRES,
HWIF_8X8TRANS_FLAG_E,
HWIF_REFPIC_MK_LEN,
HWIF_IDR_PIC_E,
HWIF_IDR_PIC_ID,
HWIF_MV_SCALEFACTOR,
HWIF_REF_DIST_FWD,
HWIF_REF_DIST_BWD,
HWIF_LOOP_FILT_LIMIT,
HWIF_VARIANCE_TEST_E,
HWIF_MV_THRESHOLD,
HWIF_VAR_THRESHOLD,
HWIF_DIVX_IDCT_E,
HWIF_DIVX3_SLICE_SIZE,
HWIF_PJPEG_REST_FREQ,
HWIF_RV_PROFILE,
HWIF_RV_OSV_QUANT,
HWIF_RV_FWD_SCALE,
HWIF_RV_BWD_SCALE,
HWIF_INIT_DC_COMP0,
HWIF_INIT_DC_COMP1,
HWIF_PPS_ID,
HWIF_REFIDX1_ACTIVE,
HWIF_REFIDX0_ACTIVE,
HWIF_POC_LENGTH,
HWIF_ICOMP0_E,
HWIF_ISCALE0,
HWIF_ISHIFT0,
HWIF_STREAM1_LEN,
HWIF_MB_CTRL_BASE,
HWIF_PIC_SLICE_AM,
HWIF_COEFFS_PART_AM,
HWIF_DIFF_MV_BASE,
HWIF_PINIT_RLIST_F9,
HWIF_PINIT_RLIST_F8,
HWIF_PINIT_RLIST_F7,
HWIF_PINIT_RLIST_F6,
HWIF_PINIT_RLIST_F5,
HWIF_PINIT_RLIST_F4,
HWIF_ICOMP1_E,
HWIF_ISCALE1,
HWIF_ISHIFT1,
HWIF_SEGMENT_BASE,
HWIF_SEGMENT_UPD_E,
HWIF_SEGMENT_E,
HWIF_I4X4_OR_DC_BASE,
HWIF_PINIT_RLIST_F15,
HWIF_PINIT_RLIST_F14,
HWIF_PINIT_RLIST_F13,
HWIF_PINIT_RLIST_F12,
HWIF_PINIT_RLIST_F11,
HWIF_PINIT_RLIST_F10,
HWIF_ICOMP2_E,
HWIF_ISCALE2,
HWIF_ISHIFT2,
HWIF_DCT3_START_BIT,
HWIF_DCT4_START_BIT,
HWIF_DCT5_START_BIT,
HWIF_DCT6_START_BIT,
HWIF_DCT7_START_BIT,
HWIF_RLC_VLC_BASE,
HWIF_DEC_OUT_BASE,
HWIF_REFER0_BASE,
HWIF_REFER0_FIELD_E,
HWIF_REFER0_TOPC_E,
HWIF_JPG_CH_OUT_BASE,
HWIF_REFER1_BASE,
HWIF_REFER1_FIELD_E,
HWIF_REFER1_TOPC_E,
HWIF_JPEG_SLICE_H,
HWIF_REFER2_BASE,
HWIF_REFER2_FIELD_E,
HWIF_REFER2_TOPC_E,
HWIF_AC1_CODE6_CNT,
HWIF_AC1_CODE5_CNT,
HWIF_AC1_CODE4_CNT,
HWIF_AC1_CODE3_CNT,
HWIF_AC1_CODE2_CNT,
HWIF_AC1_CODE1_CNT,
HWIF_REFER3_BASE,
HWIF_REFER3_FIELD_E,
HWIF_REFER3_TOPC_E,
HWIF_AC1_CODE10_CNT,
HWIF_AC1_CODE9_CNT,
HWIF_AC1_CODE8_CNT,
HWIF_AC1_CODE7_CNT,
HWIF_REFER4_BASE,
HWIF_REFER4_FIELD_E,
HWIF_REFER4_TOPC_E,
HWIF_PIC_HEADER_LEN,
HWIF_PIC_4MV_E,
HWIF_RANGE_RED_REF_E,
HWIF_VC1_DIFMV_RANGE,
HWIF_MV_RANGE,
HWIF_OVERLAP_E,
HWIF_OVERLAP_METHOD,
HWIF_ALT_SCAN_FLAG_E,
HWIF_FCODE_FWD_HOR,
HWIF_FCODE_FWD_VER,
HWIF_FCODE_BWD_HOR,
HWIF_FCODE_BWD_VER,
HWIF_MV_ACCURACY_FWD,
HWIF_MV_ACCURACY_BWD,
HWIF_MPEG4_VC1_RC,
HWIF_PREV_ANC_TYPE,
HWIF_AC1_CODE14_CNT,
HWIF_AC1_CODE13_CNT,
HWIF_AC1_CODE12_CNT,
HWIF_AC1_CODE11_CNT,
HWIF_GREF_SIGN_BIAS,
HWIF_REFER5_BASE,
HWIF_REFER5_FIELD_E,
HWIF_REFER5_TOPC_E,
HWIF_TRB_PER_TRD_D0,
HWIF_ICOMP3_E,
HWIF_ISCALE3,
HWIF_ISHIFT3,
HWIF_AC2_CODE4_CNT,
HWIF_AC2_CODE3_CNT,
HWIF_AC2_CODE2_CNT,
HWIF_AC2_CODE1_CNT,
HWIF_AC1_CODE16_CNT,
HWIF_AC1_CODE15_CNT,
HWIF_SCAN_MAP_1,
HWIF_SCAN_MAP_2,
HWIF_SCAN_MAP_3,
HWIF_SCAN_MAP_4,
HWIF_SCAN_MAP_5,
HWIF_AREF_SIGN_BIAS,
HWIF_REFER6_BASE,
HWIF_REFER6_FIELD_E,
HWIF_REFER6_TOPC_E,
HWIF_TRB_PER_TRD_DM1,
HWIF_ICOMP4_E,
HWIF_ISCALE4,
HWIF_ISHIFT4,
HWIF_AC2_CODE8_CNT,
HWIF_AC2_CODE7_CNT,
HWIF_AC2_CODE6_CNT,
HWIF_AC2_CODE5_CNT,
HWIF_SCAN_MAP_6,
HWIF_SCAN_MAP_7,
HWIF_SCAN_MAP_8,
HWIF_SCAN_MAP_9,
HWIF_SCAN_MAP_10,
HWIF_REFER7_BASE,
HWIF_REFER7_FIELD_E,
HWIF_REFER7_TOPC_E,
HWIF_TRB_PER_TRD_D1,
HWIF_AC2_CODE12_CNT,
HWIF_AC2_CODE11_CNT,
HWIF_AC2_CODE10_CNT,
HWIF_AC2_CODE9_CNT,
HWIF_SCAN_MAP_11,
HWIF_SCAN_MAP_12,
HWIF_SCAN_MAP_13,
HWIF_SCAN_MAP_14,
HWIF_SCAN_MAP_15,
HWIF_REFER8_BASE,
HWIF_DCT_STRM1_BASE,
HWIF_REFER8_FIELD_E,
HWIF_REFER8_TOPC_E,
HWIF_AC2_CODE16_CNT,
HWIF_AC2_CODE15_CNT,
HWIF_AC2_CODE14_CNT,
HWIF_AC2_CODE13_CNT,
HWIF_SCAN_MAP_16,
HWIF_SCAN_MAP_17,
HWIF_SCAN_MAP_18,
HWIF_SCAN_MAP_19,
HWIF_SCAN_MAP_20,
HWIF_REFER9_BASE,
HWIF_DCT_STRM2_BASE,
HWIF_REFER9_FIELD_E,
HWIF_REFER9_TOPC_E,
HWIF_DC1_CODE8_CNT,
HWIF_DC1_CODE7_CNT,
HWIF_DC1_CODE6_CNT,
HWIF_DC1_CODE5_CNT,
HWIF_DC1_CODE4_CNT,
HWIF_DC1_CODE3_CNT,
HWIF_DC1_CODE2_CNT,
HWIF_DC1_CODE1_CNT,
HWIF_SCAN_MAP_21,
HWIF_SCAN_MAP_22,
HWIF_SCAN_MAP_23,
HWIF_SCAN_MAP_24,
HWIF_SCAN_MAP_25,
HWIF_REFER10_BASE,
HWIF_DCT_STRM3_BASE,
HWIF_REFER10_FIELD_E,
HWIF_REFER10_TOPC_E,
HWIF_DC1_CODE16_CNT,
HWIF_DC1_CODE15_CNT,
HWIF_DC1_CODE14_CNT,
HWIF_DC1_CODE13_CNT,
HWIF_DC1_CODE12_CNT,
HWIF_DC1_CODE11_CNT,
HWIF_DC1_CODE10_CNT,
HWIF_DC1_CODE9_CNT,
HWIF_SCAN_MAP_26,
HWIF_SCAN_MAP_27,
HWIF_SCAN_MAP_28,
HWIF_SCAN_MAP_29,
HWIF_SCAN_MAP_30,
HWIF_REFER11_BASE,
HWIF_DCT_STRM4_BASE,
HWIF_REFER11_FIELD_E,
HWIF_REFER11_TOPC_E,
HWIF_DC2_CODE8_CNT,
HWIF_DC2_CODE7_CNT,
HWIF_DC2_CODE6_CNT,
HWIF_DC2_CODE5_CNT,
HWIF_DC2_CODE4_CNT,
HWIF_DC2_CODE3_CNT,
HWIF_DC2_CODE2_CNT,
HWIF_DC2_CODE1_CNT,
HWIF_SCAN_MAP_31,
HWIF_SCAN_MAP_32,
HWIF_SCAN_MAP_33,
HWIF_SCAN_MAP_34,
HWIF_SCAN_MAP_35,
HWIF_REFER12_BASE,
HWIF_DCT_STRM5_BASE,
HWIF_REFER12_FIELD_E,
HWIF_REFER12_TOPC_E,
HWIF_DC2_CODE16_CNT,
HWIF_DC2_CODE15_CNT,
HWIF_DC2_CODE14_CNT,
HWIF_DC2_CODE13_CNT,
HWIF_DC2_CODE12_CNT,
HWIF_DC2_CODE11_CNT,
HWIF_DC2_CODE10_CNT,
HWIF_DC2_CODE9_CNT,
HWIF_SCAN_MAP_36,
HWIF_SCAN_MAP_37,
HWIF_SCAN_MAP_38,
HWIF_SCAN_MAP_39,
HWIF_SCAN_MAP_40,
HWIF_REFER13_BASE,
HWIF_REFER13_FIELD_E,
HWIF_REFER13_TOPC_E,
HWIF_DC3_CODE8_CNT,
HWIF_DC3_CODE7_CNT,
HWIF_DC3_CODE6_CNT,
HWIF_DC3_CODE5_CNT,
HWIF_DC3_CODE4_CNT,
HWIF_DC3_CODE3_CNT,
HWIF_DC3_CODE2_CNT,
HWIF_DC3_CODE1_CNT,
HWIF_BITPL_CTRL_BASE,
HWIF_REFER14_BASE,
HWIF_DCT_STRM6_BASE,
HWIF_REFER14_FIELD_E,
HWIF_REFER14_TOPC_E,
HWIF_REF_INVD_CUR_1,
HWIF_REF_INVD_CUR_0,
HWIF_DC3_CODE16_CNT,
HWIF_DC3_CODE15_CNT,
HWIF_DC3_CODE14_CNT,
HWIF_DC3_CODE13_CNT,
HWIF_DC3_CODE12_CNT,
HWIF_DC3_CODE11_CNT,
HWIF_DC3_CODE10_CNT,
HWIF_DC3_CODE9_CNT,
HWIF_SCAN_MAP_41,
HWIF_SCAN_MAP_42,
HWIF_SCAN_MAP_43,
HWIF_SCAN_MAP_44,
HWIF_SCAN_MAP_45,
HWIF_REFER15_BASE,
HWIF_DCT_STRM7_BASE,
HWIF_REFER15_FIELD_E,
HWIF_REFER15_TOPC_E,
HWIF_REF_INVD_CUR_3,
HWIF_REF_INVD_CUR_2,
HWIF_SCAN_MAP_46,
HWIF_SCAN_MAP_47,
HWIF_SCAN_MAP_48,
HWIF_SCAN_MAP_49,
HWIF_SCAN_MAP_50,
HWIF_REFER1_NBR,
HWIF_REFER0_NBR,
HWIF_REF_DIST_CUR_1,
HWIF_REF_DIST_CUR_0,
HWIF_FILT_TYPE,
HWIF_FILT_SHARPNESS,
HWIF_FILT_MB_ADJ_0,
HWIF_FILT_MB_ADJ_1,
HWIF_FILT_MB_ADJ_2,
HWIF_FILT_MB_ADJ_3,
HWIF_REFER3_NBR,
HWIF_REFER2_NBR,
HWIF_SCAN_MAP_51,
HWIF_SCAN_MAP_52,
HWIF_SCAN_MAP_53,
HWIF_SCAN_MAP_54,
HWIF_SCAN_MAP_55,
HWIF_REF_DIST_CUR_3,
HWIF_REF_DIST_CUR_2,
HWIF_FILT_REF_ADJ_0,
HWIF_FILT_REF_ADJ_1,
HWIF_FILT_REF_ADJ_2,
HWIF_FILT_REF_ADJ_3,
HWIF_REFER5_NBR,
HWIF_REFER4_NBR,
HWIF_SCAN_MAP_56,
HWIF_SCAN_MAP_57,
HWIF_SCAN_MAP_58,
HWIF_SCAN_MAP_59,
HWIF_SCAN_MAP_60,
HWIF_REF_INVD_COL_1,
HWIF_REF_INVD_COL_0,
HWIF_FILT_LEVEL_0,
HWIF_FILT_LEVEL_1,
HWIF_FILT_LEVEL_2,
HWIF_FILT_LEVEL_3,
HWIF_REFER7_NBR,
HWIF_REFER6_NBR,
HWIF_SCAN_MAP_61,
HWIF_SCAN_MAP_62,
HWIF_SCAN_MAP_63,
HWIF_REF_INVD_COL_3,
HWIF_REF_INVD_COL_2,
HWIF_QUANT_DELTA_0,
HWIF_QUANT_DELTA_1,
HWIF_QUANT_0,
HWIF_QUANT_1,
HWIF_REFER9_NBR,
HWIF_REFER8_NBR,
HWIF_PRED_BC_TAP_0_3,
HWIF_PRED_BC_TAP_1_0,
HWIF_PRED_BC_TAP_1_1,
HWIF_REFER11_NBR,
HWIF_REFER10_NBR,
HWIF_PRED_BC_TAP_1_2,
HWIF_PRED_BC_TAP_1_3,
HWIF_PRED_BC_TAP_2_0,
HWIF_REFER13_NBR,
HWIF_REFER12_NBR,
HWIF_PRED_BC_TAP_2_1,
HWIF_PRED_BC_TAP_2_2,
HWIF_PRED_BC_TAP_2_3,
HWIF_REFER15_NBR,
HWIF_REFER14_NBR,
HWIF_PRED_BC_TAP_3_0,
HWIF_PRED_BC_TAP_3_1,
HWIF_PRED_BC_TAP_3_2,
HWIF_REFER_LTERM_E,
HWIF_PRED_BC_TAP_3_3,
HWIF_PRED_BC_TAP_4_0,
HWIF_PRED_BC_TAP_4_1,
HWIF_REFER_VALID_E,
HWIF_PRED_BC_TAP_4_2,
HWIF_PRED_BC_TAP_4_3,
HWIF_PRED_BC_TAP_5_0,
HWIF_QTABLE_BASE,
HWIF_DIR_MV_BASE,
HWIF_BINIT_RLIST_B2,
HWIF_BINIT_RLIST_F2,
HWIF_BINIT_RLIST_B1,
HWIF_BINIT_RLIST_F1,
HWIF_BINIT_RLIST_B0,
HWIF_BINIT_RLIST_F0,
HWIF_PRED_BC_TAP_5_1,
HWIF_PRED_BC_TAP_5_2,
HWIF_PRED_BC_TAP_5_3,
HWIF_PJPEG_DCCB_BASE,
HWIF_BINIT_RLIST_B5,
HWIF_BINIT_RLIST_F5,
HWIF_BINIT_RLIST_B4,
HWIF_BINIT_RLIST_F4,
HWIF_BINIT_RLIST_B3,
HWIF_BINIT_RLIST_F3,
HWIF_PRED_BC_TAP_6_0,
HWIF_PRED_BC_TAP_6_1,
HWIF_PRED_BC_TAP_6_2,
HWIF_PJPEG_DCCR_BASE,
HWIF_BINIT_RLIST_B8,
HWIF_BINIT_RLIST_F8,
HWIF_BINIT_RLIST_B7,
HWIF_BINIT_RLIST_F7,
HWIF_BINIT_RLIST_B6,
HWIF_BINIT_RLIST_F6,
HWIF_PRED_BC_TAP_6_3,
HWIF_PRED_BC_TAP_7_0,
HWIF_PRED_BC_TAP_7_1,
HWIF_BINIT_RLIST_B11,
HWIF_BINIT_RLIST_F11,
HWIF_BINIT_RLIST_B10,
HWIF_BINIT_RLIST_F10,
HWIF_BINIT_RLIST_B9,
HWIF_BINIT_RLIST_F9,
HWIF_PRED_BC_TAP_7_2,
HWIF_PRED_BC_TAP_7_3,
HWIF_PRED_TAP_2_M1,
HWIF_PRED_TAP_2_4,
HWIF_PRED_TAP_4_M1,
HWIF_PRED_TAP_4_4,
HWIF_PRED_TAP_6_M1,
HWIF_PRED_TAP_6_4,
HWIF_BINIT_RLIST_B14,
HWIF_BINIT_RLIST_F14,
HWIF_BINIT_RLIST_B13,
HWIF_BINIT_RLIST_F13,
HWIF_BINIT_RLIST_B12,
HWIF_BINIT_RLIST_F12,
HWIF_QUANT_DELTA_2,
HWIF_QUANT_DELTA_3,
HWIF_QUANT_2,
HWIF_QUANT_3,
HWIF_PINIT_RLIST_F3,
HWIF_PINIT_RLIST_F2,
HWIF_PINIT_RLIST_F1,
HWIF_PINIT_RLIST_F0,
HWIF_BINIT_RLIST_B15,
HWIF_BINIT_RLIST_F15,
HWIF_QUANT_DELTA_4,
HWIF_QUANT_4,
HWIF_QUANT_5,
HWIF_STARTMB_X,
HWIF_STARTMB_Y,
HWIF_PRED_BC_TAP_0_0,
HWIF_PRED_BC_TAP_0_1,
HWIF_PRED_BC_TAP_0_2,
HWIF_REFBU_E,
HWIF_REFBU_THR,
HWIF_REFBU_PICID,
HWIF_REFBU_EVAL_E,
HWIF_REFBU_FPARMOD_E,
HWIF_REFBU_Y_OFFSET,
HWIF_REFBU_HIT_SUM,
HWIF_REFBU_INTRA_SUM,
HWIF_REFBU_Y_MV_SUM,
HWIF_REFBU2_BUF_E,
HWIF_REFBU2_THR,
HWIF_REFBU2_PICID,
HWIF_APF_THRESHOLD,
HWIF_REFBU_TOP_SUM,
HWIF_REFBU_BOT_SUM,
HWIF_DEC_CH8PIX_BASE,
HWIF_PP_BUS_INT,
HWIF_PP_RDY_INT,
HWIF_PP_IRQ,
HWIF_PP_IRQ_DIS,
HWIF_PP_PIPELINE_E,
HWIF_PP_E,
HWIF_PP_AXI_RD_ID,
HWIF_PP_AXI_WR_ID,
HWIF_PP_AHB_HLOCK_E,
HWIF_PP_SCMD_DIS,
HWIF_PP_IN_A2_ENDSEL,
HWIF_PP_IN_A1_SWAP32,
HWIF_PP_IN_A1_ENDIAN,
HWIF_PP_IN_SWAP32_E,
HWIF_PP_DATA_DISC_E,
HWIF_PP_CLK_GATE_E,
HWIF_PP_IN_ENDIAN,
HWIF_PP_OUT_ENDIAN,
HWIF_PP_OUT_SWAP32_E,
HWIF_PP_MAX_BURST,
HWIF_DEINT_E,
HWIF_DEINT_THRESHOLD,
HWIF_DEINT_BLEND_E,
HWIF_DEINT_EDGE_DET,
HWIF_PP_IN_LU_BASE,
HWIF_PP_IN_CB_BASE,
HWIF_PP_IN_CR_BASE,
HWIF_PP_OUT_LU_BASE,
HWIF_PP_OUT_CH_BASE,
HWIF_CONTRAST_THR1,
HWIF_CONTRAST_OFF2,
HWIF_CONTRAST_OFF1,
HWIF_PP_IN_START_CH,
HWIF_PP_IN_CR_FIRST,
HWIF_PP_OUT_START_CH,
HWIF_PP_OUT_CR_FIRST,
HWIF_COLOR_COEFFA2,
HWIF_COLOR_COEFFA1,
HWIF_CONTRAST_THR2,
HWIF_COLOR_COEFFD,
HWIF_COLOR_COEFFC,
HWIF_COLOR_COEFFB,
HWIF_CROP_STARTX,
HWIF_ROTATION_MODE,
HWIF_COLOR_COEFFF,
HWIF_COLOR_COEFFE,
HWIF_CROP_STARTY,
HWIF_RANGEMAP_COEF_Y,
HWIF_PP_IN_HEIGHT,
HWIF_PP_IN_WIDTH,
HWIF_PP_BOT_YIN_BASE,
HWIF_PP_BOT_CIN_BASE,
HWIF_RANGEMAP_Y_E,
HWIF_RANGEMAP_C_E,
HWIF_YCBCR_RANGE,
HWIF_RGB_PIX_IN32,
HWIF_RGB_R_PADD,
HWIF_RGB_G_PADD,
HWIF_SCALE_WRATIO,
HWIF_PP_FAST_SCALE_E,
HWIF_PP_IN_STRUCT,
HWIF_HOR_SCALE_MODE,
HWIF_VER_SCALE_MODE,
HWIF_RGB_B_PADD,
HWIF_SCALE_HRATIO,
HWIF_WSCALE_INVRA,
HWIF_HSCALE_INVRA,
HWIF_R_MASK,
HWIF_G_MASK,
HWIF_B_MASK,
HWIF_PP_IN_FORMAT,
HWIF_PP_OUT_FORMAT,
HWIF_PP_OUT_HEIGHT,
HWIF_PP_OUT_WIDTH,
HWIF_PP_OUT_TILED_E,
HWIF_PP_OUT_SWAP16_E,
HWIF_PP_CROP8_R_E,
HWIF_PP_CROP8_D_E,
HWIF_PP_IN_FORMAT_ES,
HWIF_RANGEMAP_COEF_C,
HWIF_MASK1_ABLEND_E,
HWIF_MASK1_STARTY,
HWIF_MASK1_STARTX,
HWIF_MASK2_ABLEND_E,
HWIF_MASK2_STARTY,
HWIF_MASK2_STARTX,
HWIF_EXT_ORIG_WIDTH,
HWIF_MASK1_E,
HWIF_MASK1_ENDY,
HWIF_MASK1_ENDX,
HWIF_MASK2_E,
HWIF_MASK2_ENDY,
HWIF_MASK2_ENDX,
HWIF_RIGHT_CROSS_E,
HWIF_LEFT_CROSS_E,
HWIF_UP_CROSS_E,
HWIF_DOWN_CROSS_E,
HWIF_UP_CROSS,
HWIF_DOWN_CROSS,
HWIF_DITHER_SELECT_R,
HWIF_DITHER_SELECT_G,
HWIF_DITHER_SELECT_B,
HWIF_PP_TILED_MODE,
HWIF_RIGHT_CROSS,
HWIF_LEFT_CROSS,
HWIF_PP_IN_H_EXT,
HWIF_PP_IN_W_EXT,
HWIF_CROP_STARTY_EXT,
HWIF_CROP_STARTX_EXT,
HWIF_DISPLAY_WIDTH,
HWIF_ABLEND1_BASE,
HWIF_ABLEND2_BASE,
HWIF_ABLEND2_SCANL,
HWIF_ABLEND1_SCANL,

View File

@ -0,0 +1,699 @@
/* HWIF_DEC_PIC_INF */ {/*swreg*/1 , 1, 24},
/* HWIF_DEC_TIMEOUT */ {/*swreg*/1 , 1, 18},
/* HWIF_DEC_SLICE_INT */ {/*swreg*/1 , 1, 17},
/* HWIF_DEC_ERROR_INT */ {/*swreg*/1 , 1, 16},
/* HWIF_DEC_ASO_INT */ {/*swreg*/1 , 1, 15},
/* HWIF_DEC_BUFFER_INT */ {/*swreg*/1 , 1, 14},
/* HWIF_DEC_BUS_INT */ {/*swreg*/1 , 1, 13},
/* HWIF_DEC_RDY_INT */ {/*swreg*/1 , 1, 12},
/* HWIF_DEC_IRQ */ {/*swreg*/1 , 1, 8},
/* HWIF_DEC_IRQ_DIS */ {/*swreg*/1 , 1, 4},
/* HWIF_DEC_E */ {/*swreg*/1 , 1, 0},
/* HWIF_DEC_AXI_RD_ID */ {/*swreg*/2 , 8, 24},
/* HWIF_DEC_TIMEOUT_E */ {/*swreg*/2 , 1, 23},
/* HWIF_DEC_STRSWAP32_E */ {/*swreg*/2 , 1, 22},
/* HWIF_DEC_STRENDIAN_E */ {/*swreg*/2 , 1, 21},
/* HWIF_DEC_INSWAP32_E */ {/*swreg*/2 , 1, 20},
/* HWIF_DEC_OUTSWAP32_E */ {/*swreg*/2 , 1, 19},
/* HWIF_DEC_DATA_DISC_E */ {/*swreg*/2 , 1, 18},
/* HWIF_TILED_MODE_MSB */ {/*swreg*/2 , 1, 17},
/* HWIF_DEC_OUT_TILED_E */ {/*swreg*/2 , 1, 17},
/* HWIF_DEC_LATENCY */ {/*swreg*/2 , 6, 11},
/* HWIF_DEC_CLK_GATE_E */ {/*swreg*/2 , 1, 10},
/* HWIF_DEC_IN_ENDIAN */ {/*swreg*/2 , 1, 9},
/* HWIF_DEC_OUT_ENDIAN */ {/*swreg*/2 , 1, 8},
/* HWIF_PRIORITY_MODE */ {/*swreg*/2 , 3, 5},
/* HWIF_TILED_MODE_LSB */ {/*swreg*/2 , 1, 7},
/* HWIF_DEC_ADV_PRE_DIS */ {/*swreg*/2 , 1, 6},
/* HWIF_DEC_SCMD_DIS */ {/*swreg*/2 , 1, 5},
/* HWIF_DEC_MAX_BURST */ {/*swreg*/2 , 5, 0},
/* HWIF_DEC_MODE */ {/*swreg*/3 , 4, 28},
/* HWIF_RLC_MODE_E */ {/*swreg*/3 , 1, 27},
/* HWIF_SKIP_MODE */ {/*swreg*/3 , 1, 26},
/* HWIF_DIVX3_E */ {/*swreg*/3 , 1, 25},
/* HWIF_PJPEG_E */ {/*swreg*/3 , 1, 24},
/* HWIF_PIC_INTERLACE_E */ {/*swreg*/3 , 1, 23},
/* HWIF_PIC_FIELDMODE_E */ {/*swreg*/3 , 1, 22},
/* HWIF_PIC_B_E */ {/*swreg*/3 , 1, 21},
/* HWIF_PIC_INTER_E */ {/*swreg*/3 , 1, 20},
/* HWIF_PIC_TOPFIELD_E */ {/*swreg*/3 , 1, 19},
/* HWIF_FWD_INTERLACE_E */ {/*swreg*/3 , 1, 18},
/* HWIF_SORENSON_E */ {/*swreg*/3 , 1, 17},
/* HWIF_REF_TOPFIELD_E */ {/*swreg*/3 , 1, 16},
/* HWIF_DEC_OUT_DIS */ {/*swreg*/3 , 1, 15},
/* HWIF_FILTERING_DIS */ {/*swreg*/3 , 1, 14},
/* HWIF_MVC_E */ {/*swreg*/3 , 1, 13},
/* HWIF_PIC_FIXED_QUANT */ {/*swreg*/3 , 1, 13},
/* HWIF_WRITE_MVS_E */ {/*swreg*/3 , 1, 12},
/* HWIF_REFTOPFIRST_E */ {/*swreg*/3 , 1, 11},
/* HWIF_SEQ_MBAFF_E */ {/*swreg*/3 , 1, 10},
/* HWIF_PICORD_COUNT_E */ {/*swreg*/3 , 1, 9},
/* HWIF_DEC_AHB_HLOCK_E */ {/*swreg*/3 , 1, 8},
/* HWIF_DEC_AXI_WR_ID */ {/*swreg*/3 , 8, 0},
/* HWIF_PIC_MB_WIDTH */ {/*swreg*/4 , 9, 23},
/* HWIF_MB_WIDTH_OFF */ {/*swreg*/4 , 4, 19},
/* HWIF_PIC_MB_HEIGHT_P */ {/*swreg*/4 , 8, 11},
/* HWIF_MB_HEIGHT_OFF */ {/*swreg*/4 , 4, 7},
/* HWIF_ALT_SCAN_E */ {/*swreg*/4 , 1, 6},
/* HWIF_TOPFIELDFIRST_E */ {/*swreg*/4 , 1, 5},
/* HWIF_REF_FRAMES */ {/*swreg*/4 , 5, 0},
/* HWIF_PIC_MB_W_EXT */ {/*swreg*/4 , 3, 3},
/* HWIF_PIC_MB_H_EXT */ {/*swreg*/4 , 3, 0},
/* HWIF_PIC_REFER_FLAG */ {/*swreg*/4 , 1, 0},
/* HWIF_STRM_START_BIT */ {/*swreg*/5 , 6, 26},
/* HWIF_SYNC_MARKER_E */ {/*swreg*/5 , 1, 25},
/* HWIF_TYPE1_QUANT_E */ {/*swreg*/5 , 1, 24},
/* HWIF_CH_QP_OFFSET */ {/*swreg*/5 , 5, 19},
/* HWIF_CH_QP_OFFSET2 */ {/*swreg*/5 , 5, 14},
/* HWIF_FIELDPIC_FLAG_E */ {/*swreg*/5 , 1, 0},
/* HWIF_INTRADC_VLC_THR */ {/*swreg*/5 , 3, 16},
/* HWIF_VOP_TIME_INCR */ {/*swreg*/5 , 16, 0},
/* HWIF_DQ_PROFILE */ {/*swreg*/5 , 1, 24},
/* HWIF_DQBI_LEVEL */ {/*swreg*/5 , 1, 23},
/* HWIF_RANGE_RED_FRM_E */ {/*swreg*/5 , 1, 22},
/* HWIF_FAST_UVMC_E */ {/*swreg*/5 , 1, 20},
/* HWIF_TRANSDCTAB */ {/*swreg*/5 , 1, 17},
/* HWIF_TRANSACFRM */ {/*swreg*/5 , 2, 15},
/* HWIF_TRANSACFRM2 */ {/*swreg*/5 , 2, 13},
/* HWIF_MB_MODE_TAB */ {/*swreg*/5 , 3, 10},
/* HWIF_MVTAB */ {/*swreg*/5 , 3, 7},
/* HWIF_CBPTAB */ {/*swreg*/5 , 3, 4},
/* HWIF_2MV_BLK_PAT_TAB */ {/*swreg*/5 , 2, 2},
/* HWIF_4MV_BLK_PAT_TAB */ {/*swreg*/5 , 2, 0},
/* HWIF_QSCALE_TYPE */ {/*swreg*/5 , 1, 24},
/* HWIF_CON_MV_E */ {/*swreg*/5 , 1, 4},
/* HWIF_INTRA_DC_PREC */ {/*swreg*/5 , 2, 2},
/* HWIF_INTRA_VLC_TAB */ {/*swreg*/5 , 1, 1},
/* HWIF_FRAME_PRED_DCT */ {/*swreg*/5 , 1, 0},
/* HWIF_JPEG_QTABLES */ {/*swreg*/5 , 2, 11},
/* HWIF_JPEG_MODE */ {/*swreg*/5 , 3, 8},
/* HWIF_JPEG_FILRIGHT_E */ {/*swreg*/5 , 1, 7},
/* HWIF_JPEG_STREAM_ALL */ {/*swreg*/5 , 1, 6},
/* HWIF_CR_AC_VLCTABLE */ {/*swreg*/5 , 1, 5},
/* HWIF_CB_AC_VLCTABLE */ {/*swreg*/5 , 1, 4},
/* HWIF_CR_DC_VLCTABLE */ {/*swreg*/5 , 1, 3},
/* HWIF_CB_DC_VLCTABLE */ {/*swreg*/5 , 1, 2},
/* HWIF_CR_DC_VLCTABLE3 */ {/*swreg*/5 , 1, 1},
/* HWIF_CB_DC_VLCTABLE3 */ {/*swreg*/5 , 1, 0},
/* HWIF_STRM1_START_BIT */ {/*swreg*/5 , 6, 18},
/* HWIF_HUFFMAN_E */ {/*swreg*/5 , 1, 17},
/* HWIF_MULTISTREAM_E */ {/*swreg*/5 , 1, 16},
/* HWIF_BOOLEAN_VALUE */ {/*swreg*/5 , 8, 8},
/* HWIF_BOOLEAN_RANGE */ {/*swreg*/5 , 8, 0},
/* HWIF_ALPHA_OFFSET */ {/*swreg*/5 , 5, 5},
/* HWIF_BETA_OFFSET */ {/*swreg*/5 , 5, 0},
/* HWIF_START_CODE_E */ {/*swreg*/6 , 1, 31},
/* HWIF_INIT_QP */ {/*swreg*/6 , 6, 25},
/* HWIF_CH_8PIX_ILEAV_E */ {/*swreg*/6 , 1, 24},
/* HWIF_STREAM_LEN */ {/*swreg*/6 , 24, 0},
/* HWIF_CABAC_E */ {/*swreg*/7 , 1, 31},
/* HWIF_BLACKWHITE_E */ {/*swreg*/7 , 1, 30},
/* HWIF_DIR_8X8_INFER_E */ {/*swreg*/7 , 1, 29},
/* HWIF_WEIGHT_PRED_E */ {/*swreg*/7 , 1, 28},
/* HWIF_WEIGHT_BIPR_IDC */ {/*swreg*/7 , 2, 26},
/* HWIF_FRAMENUM_LEN */ {/*swreg*/7 , 5, 16},
/* HWIF_FRAMENUM */ {/*swreg*/7 , 16, 0},
/* HWIF_BITPLANE0_E */ {/*swreg*/7 , 1, 31},
/* HWIF_BITPLANE1_E */ {/*swreg*/7 , 1, 30},
/* HWIF_BITPLANE2_E */ {/*swreg*/7 , 1, 29},
/* HWIF_ALT_PQUANT */ {/*swreg*/7 , 5, 24},
/* HWIF_DQ_EDGES */ {/*swreg*/7 , 4, 20},
/* HWIF_TTMBF */ {/*swreg*/7 , 1, 19},
/* HWIF_PQINDEX */ {/*swreg*/7 , 5, 14},
/* HWIF_BILIN_MC_E */ {/*swreg*/7 , 1, 12},
/* HWIF_UNIQP_E */ {/*swreg*/7 , 1, 11},
/* HWIF_HALFQP_E */ {/*swreg*/7 , 1, 10},
/* HWIF_TTFRM */ {/*swreg*/7 , 2, 8},
/* HWIF_2ND_BYTE_EMUL_E */ {/*swreg*/7 , 1, 7},
/* HWIF_DQUANT_E */ {/*swreg*/7 , 1, 6},
/* HWIF_VC1_ADV_E */ {/*swreg*/7 , 1, 5},
/* HWIF_PJPEG_FILDOWN_E */ {/*swreg*/7 , 1, 26},
/* HWIF_PJPEG_WDIV8 */ {/*swreg*/7 , 1, 25},
/* HWIF_PJPEG_HDIV8 */ {/*swreg*/7 , 1, 24},
/* HWIF_PJPEG_AH */ {/*swreg*/7 , 4, 20},
/* HWIF_PJPEG_AL */ {/*swreg*/7 , 4, 16},
/* HWIF_PJPEG_SS */ {/*swreg*/7 , 8, 8},
/* HWIF_PJPEG_SE */ {/*swreg*/7 , 8, 0},
/* HWIF_DCT1_START_BIT */ {/*swreg*/7 , 6, 26},
/* HWIF_DCT2_START_BIT */ {/*swreg*/7 , 6, 20},
/* HWIF_CH_MV_RES */ {/*swreg*/7 , 1, 13},
/* HWIF_INIT_DC_MATCH0 */ {/*swreg*/7 , 3, 9},
/* HWIF_INIT_DC_MATCH1 */ {/*swreg*/7 , 3, 6},
/* HWIF_VP7_VERSION */ {/*swreg*/7 , 1, 5},
/* HWIF_CONST_INTRA_E */ {/*swreg*/8 , 1, 31},
/* HWIF_FILT_CTRL_PRES */ {/*swreg*/8 , 1, 30},
/* HWIF_RDPIC_CNT_PRES */ {/*swreg*/8 , 1, 29},
/* HWIF_8X8TRANS_FLAG_E */ {/*swreg*/8 , 1, 28},
/* HWIF_REFPIC_MK_LEN */ {/*swreg*/8 , 11, 17},
/* HWIF_IDR_PIC_E */ {/*swreg*/8 , 1, 16},
/* HWIF_IDR_PIC_ID */ {/*swreg*/8 , 16, 0},
/* HWIF_MV_SCALEFACTOR */ {/*swreg*/8 , 8, 24},
/* HWIF_REF_DIST_FWD */ {/*swreg*/8 , 5, 19},
/* HWIF_REF_DIST_BWD */ {/*swreg*/8 , 5, 14},
/* HWIF_LOOP_FILT_LIMIT */ {/*swreg*/8 , 4, 14},
/* HWIF_VARIANCE_TEST_E */ {/*swreg*/8 , 1, 13},
/* HWIF_MV_THRESHOLD */ {/*swreg*/8 , 3, 10},
/* HWIF_VAR_THRESHOLD */ {/*swreg*/8 , 10, 0},
/* HWIF_DIVX_IDCT_E */ {/*swreg*/8 , 1, 8},
/* HWIF_DIVX3_SLICE_SIZE */ {/*swreg*/8 , 8, 0},
/* HWIF_PJPEG_REST_FREQ */ {/*swreg*/8 , 16, 0},
/* HWIF_RV_PROFILE */ {/*swreg*/8 , 2, 30},
/* HWIF_RV_OSV_QUANT */ {/*swreg*/8 , 2, 28},
/* HWIF_RV_FWD_SCALE */ {/*swreg*/8 , 14, 14},
/* HWIF_RV_BWD_SCALE */ {/*swreg*/8 , 14, 0},
/* HWIF_INIT_DC_COMP0 */ {/*swreg*/8 , 16, 16},
/* HWIF_INIT_DC_COMP1 */ {/*swreg*/8 , 16, 0},
/* HWIF_PPS_ID */ {/*swreg*/9 , 8, 24},
/* HWIF_REFIDX1_ACTIVE */ {/*swreg*/9 , 5, 19},
/* HWIF_REFIDX0_ACTIVE */ {/*swreg*/9 , 5, 14},
/* HWIF_POC_LENGTH */ {/*swreg*/9 , 8, 0},
/* HWIF_ICOMP0_E */ {/*swreg*/9 , 1, 24},
/* HWIF_ISCALE0 */ {/*swreg*/9 , 8, 16},
/* HWIF_ISHIFT0 */ {/*swreg*/9 , 16, 0},
/* HWIF_STREAM1_LEN */ {/*swreg*/9 , 24, 0},
/* HWIF_MB_CTRL_BASE */ {/*swreg*/9 , 32, 0},
/* HWIF_PIC_SLICE_AM */ {/*swreg*/9 , 13, 0},
/* HWIF_COEFFS_PART_AM */ {/*swreg*/9 , 4, 24},
/* HWIF_DIFF_MV_BASE */ {/*swreg*/10, 32, 0},
/* HWIF_PINIT_RLIST_F9 */ {/*swreg*/10, 5, 25},
/* HWIF_PINIT_RLIST_F8 */ {/*swreg*/10, 5, 20},
/* HWIF_PINIT_RLIST_F7 */ {/*swreg*/10, 5, 15},
/* HWIF_PINIT_RLIST_F6 */ {/*swreg*/10, 5, 10},
/* HWIF_PINIT_RLIST_F5 */ {/*swreg*/10, 5, 5},
/* HWIF_PINIT_RLIST_F4 */ {/*swreg*/10, 5, 0},
/* HWIF_ICOMP1_E */ {/*swreg*/10, 1, 24},
/* HWIF_ISCALE1 */ {/*swreg*/10, 8, 16},
/* HWIF_ISHIFT1 */ {/*swreg*/10, 16, 0},
/* HWIF_SEGMENT_BASE */ {/*swreg*/10, 32, 0},
/* HWIF_SEGMENT_UPD_E */ {/*swreg*/10, 1, 1},
/* HWIF_SEGMENT_E */ {/*swreg*/10, 1, 0},
/* HWIF_I4X4_OR_DC_BASE */ {/*swreg*/11, 32, 0},
/* HWIF_PINIT_RLIST_F15 */ {/*swreg*/11, 5, 25},
/* HWIF_PINIT_RLIST_F14 */ {/*swreg*/11, 5, 20},
/* HWIF_PINIT_RLIST_F13 */ {/*swreg*/11, 5, 15},
/* HWIF_PINIT_RLIST_F12 */ {/*swreg*/11, 5, 10},
/* HWIF_PINIT_RLIST_F11 */ {/*swreg*/11, 5, 5},
/* HWIF_PINIT_RLIST_F10 */ {/*swreg*/11, 5, 0},
/* HWIF_ICOMP2_E */ {/*swreg*/11, 1, 24},
/* HWIF_ISCALE2 */ {/*swreg*/11, 8, 16},
/* HWIF_ISHIFT2 */ {/*swreg*/11, 16, 0},
/* HWIF_DCT3_START_BIT */ {/*swreg*/11, 6, 24},
/* HWIF_DCT4_START_BIT */ {/*swreg*/11, 6, 18},
/* HWIF_DCT5_START_BIT */ {/*swreg*/11, 6, 12},
/* HWIF_DCT6_START_BIT */ {/*swreg*/11, 6, 6},
/* HWIF_DCT7_START_BIT */ {/*swreg*/11, 6, 0},
/* HWIF_RLC_VLC_BASE */ {/*swreg*/12, 32, 0},
/* HWIF_DEC_OUT_BASE */ {/*swreg*/13, 32, 0},
/* HWIF_REFER0_BASE */ {/*swreg*/14, 32, 0},
/* HWIF_REFER0_FIELD_E */ {/*swreg*/14, 1, 1},
/* HWIF_REFER0_TOPC_E */ {/*swreg*/14, 1, 0},
/* HWIF_JPG_CH_OUT_BASE */ {/*swreg*/14, 32, 0},
/* HWIF_REFER1_BASE */ {/*swreg*/15, 32, 0},
/* HWIF_REFER1_FIELD_E */ {/*swreg*/15, 1, 1},
/* HWIF_REFER1_TOPC_E */ {/*swreg*/15, 1, 0},
/* HWIF_JPEG_SLICE_H */ {/*swreg*/15, 8, 0},
/* HWIF_REFER2_BASE */ {/*swreg*/16, 32, 0},
/* HWIF_REFER2_FIELD_E */ {/*swreg*/16, 1, 1},
/* HWIF_REFER2_TOPC_E */ {/*swreg*/16, 1, 0},
/* HWIF_AC1_CODE6_CNT */ {/*swreg*/16, 7, 24},
/* HWIF_AC1_CODE5_CNT */ {/*swreg*/16, 6, 16},
/* HWIF_AC1_CODE4_CNT */ {/*swreg*/16, 5, 11},
/* HWIF_AC1_CODE3_CNT */ {/*swreg*/16, 4, 7},
/* HWIF_AC1_CODE2_CNT */ {/*swreg*/16, 3, 3},
/* HWIF_AC1_CODE1_CNT */ {/*swreg*/16, 2, 0},
/* HWIF_REFER3_BASE */ {/*swreg*/17, 32, 0},
/* HWIF_REFER3_FIELD_E */ {/*swreg*/17, 1, 1},
/* HWIF_REFER3_TOPC_E */ {/*swreg*/17, 1, 0},
/* HWIF_AC1_CODE10_CNT */ {/*swreg*/17, 8, 24},
/* HWIF_AC1_CODE9_CNT */ {/*swreg*/17, 8, 16},
/* HWIF_AC1_CODE8_CNT */ {/*swreg*/17, 8, 8},
/* HWIF_AC1_CODE7_CNT */ {/*swreg*/17, 8, 0},
/* HWIF_REFER4_BASE */ {/*swreg*/18, 32, 0},
/* HWIF_REFER4_FIELD_E */ {/*swreg*/18, 1, 1},
/* HWIF_REFER4_TOPC_E */ {/*swreg*/18, 1, 0},
/* HWIF_PIC_HEADER_LEN */ {/*swreg*/18, 16, 16},
/* HWIF_PIC_4MV_E */ {/*swreg*/18, 1, 13},
/* HWIF_RANGE_RED_REF_E */ {/*swreg*/18, 1, 11},
/* HWIF_VC1_DIFMV_RANGE */ {/*swreg*/18, 2, 9},
/* HWIF_MV_RANGE */ {/*swreg*/18, 2, 6},
/* HWIF_OVERLAP_E */ {/*swreg*/18, 1, 5},
/* HWIF_OVERLAP_METHOD */ {/*swreg*/18, 2, 3},
/* HWIF_ALT_SCAN_FLAG_E */ {/*swreg*/18, 1, 19},
/* HWIF_FCODE_FWD_HOR */ {/*swreg*/18, 4, 15},
/* HWIF_FCODE_FWD_VER */ {/*swreg*/18, 4, 11},
/* HWIF_FCODE_BWD_HOR */ {/*swreg*/18, 4, 7},
/* HWIF_FCODE_BWD_VER */ {/*swreg*/18, 4, 3},
/* HWIF_MV_ACCURACY_FWD */ {/*swreg*/18, 1, 2},
/* HWIF_MV_ACCURACY_BWD */ {/*swreg*/18, 1, 1},
/* HWIF_MPEG4_VC1_RC */ {/*swreg*/18, 1, 1},
/* HWIF_PREV_ANC_TYPE */ {/*swreg*/18, 1, 0},
/* HWIF_AC1_CODE14_CNT */ {/*swreg*/18, 8, 24},
/* HWIF_AC1_CODE13_CNT */ {/*swreg*/18, 8, 16},
/* HWIF_AC1_CODE12_CNT */ {/*swreg*/18, 8, 8},
/* HWIF_AC1_CODE11_CNT */ {/*swreg*/18, 8, 0},
/* HWIF_GREF_SIGN_BIAS */ {/*swreg*/18, 1, 0},
/* HWIF_REFER5_BASE */ {/*swreg*/19, 32, 0},
/* HWIF_REFER5_FIELD_E */ {/*swreg*/19, 1, 1},
/* HWIF_REFER5_TOPC_E */ {/*swreg*/19, 1, 0},
/* HWIF_TRB_PER_TRD_D0 */ {/*swreg*/19, 27, 0},
/* HWIF_ICOMP3_E */ {/*swreg*/19, 1, 24},
/* HWIF_ISCALE3 */ {/*swreg*/19, 8, 16},
/* HWIF_ISHIFT3 */ {/*swreg*/19, 16, 0},
/* HWIF_AC2_CODE4_CNT */ {/*swreg*/19, 5, 27},
/* HWIF_AC2_CODE3_CNT */ {/*swreg*/19, 4, 23},
/* HWIF_AC2_CODE2_CNT */ {/*swreg*/19, 3, 19},
/* HWIF_AC2_CODE1_CNT */ {/*swreg*/19, 2, 16},
/* HWIF_AC1_CODE16_CNT */ {/*swreg*/19, 8, 8},
/* HWIF_AC1_CODE15_CNT */ {/*swreg*/19, 8, 0},
/* HWIF_SCAN_MAP_1 */ {/*swreg*/19, 6, 24},
/* HWIF_SCAN_MAP_2 */ {/*swreg*/19, 6, 18},
/* HWIF_SCAN_MAP_3 */ {/*swreg*/19, 6, 12},
/* HWIF_SCAN_MAP_4 */ {/*swreg*/19, 6, 6},
/* HWIF_SCAN_MAP_5 */ {/*swreg*/19, 6, 0},
/* HWIF_AREF_SIGN_BIAS */ {/*swreg*/19, 1, 0},
/* HWIF_REFER6_BASE */ {/*swreg*/20, 32, 0},
/* HWIF_REFER6_FIELD_E */ {/*swreg*/20, 1, 1},
/* HWIF_REFER6_TOPC_E */ {/*swreg*/20, 1, 0},
/* HWIF_TRB_PER_TRD_DM1 */ {/*swreg*/20, 27, 0},
/* HWIF_ICOMP4_E */ {/*swreg*/20, 1, 24},
/* HWIF_ISCALE4 */ {/*swreg*/20, 8, 16},
/* HWIF_ISHIFT4 */ {/*swreg*/20, 16, 0},
/* HWIF_AC2_CODE8_CNT */ {/*swreg*/20, 8, 24},
/* HWIF_AC2_CODE7_CNT */ {/*swreg*/20, 8, 16},
/* HWIF_AC2_CODE6_CNT */ {/*swreg*/20, 7, 8},
/* HWIF_AC2_CODE5_CNT */ {/*swreg*/20, 6, 0},
/* HWIF_SCAN_MAP_6 */ {/*swreg*/20, 6, 24},
/* HWIF_SCAN_MAP_7 */ {/*swreg*/20, 6, 18},
/* HWIF_SCAN_MAP_8 */ {/*swreg*/20, 6, 12},
/* HWIF_SCAN_MAP_9 */ {/*swreg*/20, 6, 6},
/* HWIF_SCAN_MAP_10 */ {/*swreg*/20, 6, 0},
/* HWIF_REFER7_BASE */ {/*swreg*/21, 32, 0},
/* HWIF_REFER7_FIELD_E */ {/*swreg*/21, 1, 1},
/* HWIF_REFER7_TOPC_E */ {/*swreg*/21, 1, 0},
/* HWIF_TRB_PER_TRD_D1 */ {/*swreg*/21, 27, 0},
/* HWIF_AC2_CODE12_CNT */ {/*swreg*/21, 8, 24},
/* HWIF_AC2_CODE11_CNT */ {/*swreg*/21, 8, 16},
/* HWIF_AC2_CODE10_CNT */ {/*swreg*/21, 8, 8},
/* HWIF_AC2_CODE9_CNT */ {/*swreg*/21, 8, 0},
/* HWIF_SCAN_MAP_11 */ {/*swreg*/21, 6, 24},
/* HWIF_SCAN_MAP_12 */ {/*swreg*/21, 6, 18},
/* HWIF_SCAN_MAP_13 */ {/*swreg*/21, 6, 12},
/* HWIF_SCAN_MAP_14 */ {/*swreg*/21, 6, 6},
/* HWIF_SCAN_MAP_15 */ {/*swreg*/21, 6, 0},
/* HWIF_REFER8_BASE */ {/*swreg*/22, 32, 0},
/* HWIF_DCT_STRM1_BASE */ {/*swreg*/22, 32, 0},
/* HWIF_REFER8_FIELD_E */ {/*swreg*/22, 1, 1},
/* HWIF_REFER8_TOPC_E */ {/*swreg*/22, 1, 0},
/* HWIF_AC2_CODE16_CNT */ {/*swreg*/22, 8, 24},
/* HWIF_AC2_CODE15_CNT */ {/*swreg*/22, 8, 16},
/* HWIF_AC2_CODE14_CNT */ {/*swreg*/22, 8, 8},
/* HWIF_AC2_CODE13_CNT */ {/*swreg*/22, 8, 0},
/* HWIF_SCAN_MAP_16 */ {/*swreg*/22, 6, 24},
/* HWIF_SCAN_MAP_17 */ {/*swreg*/22, 6, 18},
/* HWIF_SCAN_MAP_18 */ {/*swreg*/22, 6, 12},
/* HWIF_SCAN_MAP_19 */ {/*swreg*/22, 6, 6},
/* HWIF_SCAN_MAP_20 */ {/*swreg*/22, 6, 0},
/* HWIF_REFER9_BASE */ {/*swreg*/23, 32, 0},
/* HWIF_DCT_STRM2_BASE */ {/*swreg*/23, 32, 0},
/* HWIF_REFER9_FIELD_E */ {/*swreg*/23, 1, 1},
/* HWIF_REFER9_TOPC_E */ {/*swreg*/23, 1, 0},
/* HWIF_DC1_CODE8_CNT */ {/*swreg*/23, 4, 28},
/* HWIF_DC1_CODE7_CNT */ {/*swreg*/23, 4, 24},
/* HWIF_DC1_CODE6_CNT */ {/*swreg*/23, 4, 20},
/* HWIF_DC1_CODE5_CNT */ {/*swreg*/23, 4, 16},
/* HWIF_DC1_CODE4_CNT */ {/*swreg*/23, 4, 12},
/* HWIF_DC1_CODE3_CNT */ {/*swreg*/23, 4, 8},
/* HWIF_DC1_CODE2_CNT */ {/*swreg*/23, 3, 4},
/* HWIF_DC1_CODE1_CNT */ {/*swreg*/23, 2, 0},
/* HWIF_SCAN_MAP_21 */ {/*swreg*/23, 6, 24},
/* HWIF_SCAN_MAP_22 */ {/*swreg*/23, 6, 18},
/* HWIF_SCAN_MAP_23 */ {/*swreg*/23, 6, 12},
/* HWIF_SCAN_MAP_24 */ {/*swreg*/23, 6, 6},
/* HWIF_SCAN_MAP_25 */ {/*swreg*/23, 6, 0},
/* HWIF_REFER10_BASE */ {/*swreg*/24, 32, 0},
/* HWIF_DCT_STRM3_BASE */ {/*swreg*/24, 32, 0},
/* HWIF_REFER10_FIELD_E */ {/*swreg*/24, 1, 1},
/* HWIF_REFER10_TOPC_E */ {/*swreg*/24, 1, 0},
/* HWIF_DC1_CODE16_CNT */ {/*swreg*/24, 4, 28},
/* HWIF_DC1_CODE15_CNT */ {/*swreg*/24, 4, 24},
/* HWIF_DC1_CODE14_CNT */ {/*swreg*/24, 4, 20},
/* HWIF_DC1_CODE13_CNT */ {/*swreg*/24, 4, 16},
/* HWIF_DC1_CODE12_CNT */ {/*swreg*/24, 4, 12},
/* HWIF_DC1_CODE11_CNT */ {/*swreg*/24, 4, 8},
/* HWIF_DC1_CODE10_CNT */ {/*swreg*/24, 4, 4},
/* HWIF_DC1_CODE9_CNT */ {/*swreg*/24, 4, 0},
/* HWIF_SCAN_MAP_26 */ {/*swreg*/24, 6, 24},
/* HWIF_SCAN_MAP_27 */ {/*swreg*/24, 6, 18},
/* HWIF_SCAN_MAP_28 */ {/*swreg*/24, 6, 12},
/* HWIF_SCAN_MAP_29 */ {/*swreg*/24, 6, 6},
/* HWIF_SCAN_MAP_30 */ {/*swreg*/24, 6, 0},
/* HWIF_REFER11_BASE */ {/*swreg*/25, 32, 0},
/* HWIF_DCT_STRM4_BASE */ {/*swreg*/25, 32, 0},
/* HWIF_REFER11_FIELD_E */ {/*swreg*/25, 1, 1},
/* HWIF_REFER11_TOPC_E */ {/*swreg*/25, 1, 0},
/* HWIF_DC2_CODE8_CNT */ {/*swreg*/25, 4, 28},
/* HWIF_DC2_CODE7_CNT */ {/*swreg*/25, 4, 24},
/* HWIF_DC2_CODE6_CNT */ {/*swreg*/25, 4, 20},
/* HWIF_DC2_CODE5_CNT */ {/*swreg*/25, 4, 16},
/* HWIF_DC2_CODE4_CNT */ {/*swreg*/25, 4, 12},
/* HWIF_DC2_CODE3_CNT */ {/*swreg*/25, 4, 8},
/* HWIF_DC2_CODE2_CNT */ {/*swreg*/25, 3, 4},
/* HWIF_DC2_CODE1_CNT */ {/*swreg*/25, 2, 0},
/* HWIF_SCAN_MAP_31 */ {/*swreg*/25, 6, 24},
/* HWIF_SCAN_MAP_32 */ {/*swreg*/25, 6, 18},
/* HWIF_SCAN_MAP_33 */ {/*swreg*/25, 6, 12},
/* HWIF_SCAN_MAP_34 */ {/*swreg*/25, 6, 6},
/* HWIF_SCAN_MAP_35 */ {/*swreg*/25, 6, 0},
/* HWIF_REFER12_BASE */ {/*swreg*/26, 32, 0},
/* HWIF_DCT_STRM5_BASE */ {/*swreg*/26, 32, 0},
/* HWIF_REFER12_FIELD_E */ {/*swreg*/26, 1, 1},
/* HWIF_REFER12_TOPC_E */ {/*swreg*/26, 1, 0},
/* HWIF_DC2_CODE16_CNT */ {/*swreg*/26, 4, 28},
/* HWIF_DC2_CODE15_CNT */ {/*swreg*/26, 4, 24},
/* HWIF_DC2_CODE14_CNT */ {/*swreg*/26, 4, 20},
/* HWIF_DC2_CODE13_CNT */ {/*swreg*/26, 4, 16},
/* HWIF_DC2_CODE12_CNT */ {/*swreg*/26, 4, 12},
/* HWIF_DC2_CODE11_CNT */ {/*swreg*/26, 4, 8},
/* HWIF_DC2_CODE10_CNT */ {/*swreg*/26, 4, 4},
/* HWIF_DC2_CODE9_CNT */ {/*swreg*/26, 4, 0},
/* HWIF_SCAN_MAP_36 */ {/*swreg*/26, 6, 24},
/* HWIF_SCAN_MAP_37 */ {/*swreg*/26, 6, 18},
/* HWIF_SCAN_MAP_38 */ {/*swreg*/26, 6, 12},
/* HWIF_SCAN_MAP_39 */ {/*swreg*/26, 6, 6},
/* HWIF_SCAN_MAP_40 */ {/*swreg*/26, 6, 0},
/* HWIF_REFER13_BASE */ {/*swreg*/27, 32, 0},
/* HWIF_REFER13_FIELD_E */ {/*swreg*/27, 1, 1},
/* HWIF_REFER13_TOPC_E */ {/*swreg*/27, 1, 0},
/* HWIF_DC3_CODE8_CNT */ {/*swreg*/27, 4, 28},
/* HWIF_DC3_CODE7_CNT */ {/*swreg*/27, 4, 24},
/* HWIF_DC3_CODE6_CNT */ {/*swreg*/27, 4, 20},
/* HWIF_DC3_CODE5_CNT */ {/*swreg*/27, 4, 16},
/* HWIF_DC3_CODE4_CNT */ {/*swreg*/27, 4, 12},
/* HWIF_DC3_CODE3_CNT */ {/*swreg*/27, 4, 8},
/* HWIF_DC3_CODE2_CNT */ {/*swreg*/27, 3, 4},
/* HWIF_DC3_CODE1_CNT */ {/*swreg*/27, 2, 0},
/* HWIF_BITPL_CTRL_BASE */ {/*swreg*/27, 32, 0},
/* HWIF_REFER14_BASE */ {/*swreg*/28, 32, 0},
/* HWIF_DCT_STRM6_BASE */ {/*swreg*/28, 32, 0},
/* HWIF_REFER14_FIELD_E */ {/*swreg*/28, 1, 1},
/* HWIF_REFER14_TOPC_E */ {/*swreg*/28, 1, 0},
/* HWIF_REF_INVD_CUR_1 */ {/*swreg*/28, 16, 16},
/* HWIF_REF_INVD_CUR_0 */ {/*swreg*/28, 16, 0},
/* HWIF_DC3_CODE16_CNT */ {/*swreg*/28, 4, 28},
/* HWIF_DC3_CODE15_CNT */ {/*swreg*/28, 4, 24},
/* HWIF_DC3_CODE14_CNT */ {/*swreg*/28, 4, 20},
/* HWIF_DC3_CODE13_CNT */ {/*swreg*/28, 4, 16},
/* HWIF_DC3_CODE12_CNT */ {/*swreg*/28, 4, 12},
/* HWIF_DC3_CODE11_CNT */ {/*swreg*/28, 4, 8},
/* HWIF_DC3_CODE10_CNT */ {/*swreg*/28, 4, 4},
/* HWIF_DC3_CODE9_CNT */ {/*swreg*/28, 4, 0},
/* HWIF_SCAN_MAP_41 */ {/*swreg*/28, 6, 24},
/* HWIF_SCAN_MAP_42 */ {/*swreg*/28, 6, 18},
/* HWIF_SCAN_MAP_43 */ {/*swreg*/28, 6, 12},
/* HWIF_SCAN_MAP_44 */ {/*swreg*/28, 6, 6},
/* HWIF_SCAN_MAP_45 */ {/*swreg*/28, 6, 0},
/* HWIF_REFER15_BASE */ {/*swreg*/29, 32, 0},
/* HWIF_DCT_STRM7_BASE */ {/*swreg*/29, 32, 0},
/* HWIF_REFER15_FIELD_E */ {/*swreg*/29, 1, 1},
/* HWIF_REFER15_TOPC_E */ {/*swreg*/29, 1, 0},
/* HWIF_REF_INVD_CUR_3 */ {/*swreg*/29, 16, 16},
/* HWIF_REF_INVD_CUR_2 */ {/*swreg*/29, 16, 0},
/* HWIF_SCAN_MAP_46 */ {/*swreg*/29, 6, 24},
/* HWIF_SCAN_MAP_47 */ {/*swreg*/29, 6, 18},
/* HWIF_SCAN_MAP_48 */ {/*swreg*/29, 6, 12},
/* HWIF_SCAN_MAP_49 */ {/*swreg*/29, 6, 6},
/* HWIF_SCAN_MAP_50 */ {/*swreg*/29, 6, 0},
/* HWIF_REFER1_NBR */ {/*swreg*/30, 16, 16},
/* HWIF_REFER0_NBR */ {/*swreg*/30, 16, 0},
/* HWIF_REF_DIST_CUR_1 */ {/*swreg*/30, 16, 16},
/* HWIF_REF_DIST_CUR_0 */ {/*swreg*/30, 16, 0},
/* HWIF_FILT_TYPE */ {/*swreg*/30, 1, 31},
/* HWIF_FILT_SHARPNESS */ {/*swreg*/30, 3, 28},
/* HWIF_FILT_MB_ADJ_0 */ {/*swreg*/30, 7, 21},
/* HWIF_FILT_MB_ADJ_1 */ {/*swreg*/30, 7, 14},
/* HWIF_FILT_MB_ADJ_2 */ {/*swreg*/30, 7, 7},
/* HWIF_FILT_MB_ADJ_3 */ {/*swreg*/30, 7, 0},
/* HWIF_REFER3_NBR */ {/*swreg*/31, 16, 16},
/* HWIF_REFER2_NBR */ {/*swreg*/31, 16, 0},
/* HWIF_SCAN_MAP_51 */ {/*swreg*/31, 6, 24},
/* HWIF_SCAN_MAP_52 */ {/*swreg*/31, 6, 18},
/* HWIF_SCAN_MAP_53 */ {/*swreg*/31, 6, 12},
/* HWIF_SCAN_MAP_54 */ {/*swreg*/31, 6, 6},
/* HWIF_SCAN_MAP_55 */ {/*swreg*/31, 6, 0},
/* HWIF_REF_DIST_CUR_3 */ {/*swreg*/31, 16, 16},
/* HWIF_REF_DIST_CUR_2 */ {/*swreg*/31, 16, 0},
/* HWIF_FILT_REF_ADJ_0 */ {/*swreg*/31, 7, 21},
/* HWIF_FILT_REF_ADJ_1 */ {/*swreg*/31, 7, 14},
/* HWIF_FILT_REF_ADJ_2 */ {/*swreg*/31, 7, 7},
/* HWIF_FILT_REF_ADJ_3 */ {/*swreg*/31, 7, 0},
/* HWIF_REFER5_NBR */ {/*swreg*/32, 16, 16},
/* HWIF_REFER4_NBR */ {/*swreg*/32, 16, 0},
/* HWIF_SCAN_MAP_56 */ {/*swreg*/32, 6, 24},
/* HWIF_SCAN_MAP_57 */ {/*swreg*/32, 6, 18},
/* HWIF_SCAN_MAP_58 */ {/*swreg*/32, 6, 12},
/* HWIF_SCAN_MAP_59 */ {/*swreg*/32, 6, 6},
/* HWIF_SCAN_MAP_60 */ {/*swreg*/32, 6, 0},
/* HWIF_REF_INVD_COL_1 */ {/*swreg*/32, 16, 16},
/* HWIF_REF_INVD_COL_0 */ {/*swreg*/32, 16, 0},
/* HWIF_FILT_LEVEL_0 */ {/*swreg*/32, 6, 18},
/* HWIF_FILT_LEVEL_1 */ {/*swreg*/32, 6, 12},
/* HWIF_FILT_LEVEL_2 */ {/*swreg*/32, 6, 6},
/* HWIF_FILT_LEVEL_3 */ {/*swreg*/32, 6, 0},
/* HWIF_REFER7_NBR */ {/*swreg*/33, 16, 16},
/* HWIF_REFER6_NBR */ {/*swreg*/33, 16, 0},
/* HWIF_SCAN_MAP_61 */ {/*swreg*/33, 6, 24},
/* HWIF_SCAN_MAP_62 */ {/*swreg*/33, 6, 18},
/* HWIF_SCAN_MAP_63 */ {/*swreg*/33, 6, 12},
/* HWIF_REF_INVD_COL_3 */ {/*swreg*/33, 16, 16},
/* HWIF_REF_INVD_COL_2 */ {/*swreg*/33, 16, 0},
/* HWIF_QUANT_DELTA_0 */ {/*swreg*/33, 5, 27},
/* HWIF_QUANT_DELTA_1 */ {/*swreg*/33, 5, 22},
/* HWIF_QUANT_0 */ {/*swreg*/33, 11, 11},
/* HWIF_QUANT_1 */ {/*swreg*/33, 11, 0},
/* HWIF_REFER9_NBR */ {/*swreg*/34, 16, 16},
/* HWIF_REFER8_NBR */ {/*swreg*/34, 16, 0},
/* HWIF_PRED_BC_TAP_0_3 */ {/*swreg*/34, 10, 22},
/* HWIF_PRED_BC_TAP_1_0 */ {/*swreg*/34, 10, 12},
/* HWIF_PRED_BC_TAP_1_1 */ {/*swreg*/34, 10, 2},
/* HWIF_REFER11_NBR */ {/*swreg*/35, 16, 16},
/* HWIF_REFER10_NBR */ {/*swreg*/35, 16, 0},
/* HWIF_PRED_BC_TAP_1_2 */ {/*swreg*/35, 10, 22},
/* HWIF_PRED_BC_TAP_1_3 */ {/*swreg*/35, 10, 12},
/* HWIF_PRED_BC_TAP_2_0 */ {/*swreg*/35, 10, 2},
/* HWIF_REFER13_NBR */ {/*swreg*/36, 16, 16},
/* HWIF_REFER12_NBR */ {/*swreg*/36, 16, 0},
/* HWIF_PRED_BC_TAP_2_1 */ {/*swreg*/36, 10, 22},
/* HWIF_PRED_BC_TAP_2_2 */ {/*swreg*/36, 10, 12},
/* HWIF_PRED_BC_TAP_2_3 */ {/*swreg*/36, 10, 2},
/* HWIF_REFER15_NBR */ {/*swreg*/37, 16, 16},
/* HWIF_REFER14_NBR */ {/*swreg*/37, 16, 0},
/* HWIF_PRED_BC_TAP_3_0 */ {/*swreg*/37, 10, 22},
/* HWIF_PRED_BC_TAP_3_1 */ {/*swreg*/37, 10, 12},
/* HWIF_PRED_BC_TAP_3_2 */ {/*swreg*/37, 10, 2},
/* HWIF_REFER_LTERM_E */ {/*swreg*/38, 32, 0},
/* HWIF_PRED_BC_TAP_3_3 */ {/*swreg*/38, 10, 22},
/* HWIF_PRED_BC_TAP_4_0 */ {/*swreg*/38, 10, 12},
/* HWIF_PRED_BC_TAP_4_1 */ {/*swreg*/38, 10, 2},
/* HWIF_REFER_VALID_E */ {/*swreg*/39, 32, 0},
/* HWIF_PRED_BC_TAP_4_2 */ {/*swreg*/39, 10, 22},
/* HWIF_PRED_BC_TAP_4_3 */ {/*swreg*/39, 10, 12},
/* HWIF_PRED_BC_TAP_5_0 */ {/*swreg*/39, 10, 2},
/* HWIF_QTABLE_BASE */ {/*swreg*/40, 32, 0},
/* HWIF_DIR_MV_BASE */ {/*swreg*/41, 32, 0},
/* HWIF_BINIT_RLIST_B2 */ {/*swreg*/42, 5, 25},
/* HWIF_BINIT_RLIST_F2 */ {/*swreg*/42, 5, 20},
/* HWIF_BINIT_RLIST_B1 */ {/*swreg*/42, 5, 15},
/* HWIF_BINIT_RLIST_F1 */ {/*swreg*/42, 5, 10},
/* HWIF_BINIT_RLIST_B0 */ {/*swreg*/42, 5, 5},
/* HWIF_BINIT_RLIST_F0 */ {/*swreg*/42, 5, 0},
/* HWIF_PRED_BC_TAP_5_1 */ {/*swreg*/42, 10, 22},
/* HWIF_PRED_BC_TAP_5_2 */ {/*swreg*/42, 10, 12},
/* HWIF_PRED_BC_TAP_5_3 */ {/*swreg*/42, 10, 2},
/* HWIF_PJPEG_DCCB_BASE */ {/*swreg*/42, 32, 0},
/* HWIF_BINIT_RLIST_B5 */ {/*swreg*/43, 5, 25},
/* HWIF_BINIT_RLIST_F5 */ {/*swreg*/43, 5, 20},
/* HWIF_BINIT_RLIST_B4 */ {/*swreg*/43, 5, 15},
/* HWIF_BINIT_RLIST_F4 */ {/*swreg*/43, 5, 10},
/* HWIF_BINIT_RLIST_B3 */ {/*swreg*/43, 5, 5},
/* HWIF_BINIT_RLIST_F3 */ {/*swreg*/43, 5, 0},
/* HWIF_PRED_BC_TAP_6_0 */ {/*swreg*/43, 10, 22},
/* HWIF_PRED_BC_TAP_6_1 */ {/*swreg*/43, 10, 12},
/* HWIF_PRED_BC_TAP_6_2 */ {/*swreg*/43, 10, 2},
/* HWIF_PJPEG_DCCR_BASE */ {/*swreg*/43, 32, 0},
/* HWIF_BINIT_RLIST_B8 */ {/*swreg*/44, 5, 25},
/* HWIF_BINIT_RLIST_F8 */ {/*swreg*/44, 5, 20},
/* HWIF_BINIT_RLIST_B7 */ {/*swreg*/44, 5, 15},
/* HWIF_BINIT_RLIST_F7 */ {/*swreg*/44, 5, 10},
/* HWIF_BINIT_RLIST_B6 */ {/*swreg*/44, 5, 5},
/* HWIF_BINIT_RLIST_F6 */ {/*swreg*/44, 5, 0},
/* HWIF_PRED_BC_TAP_6_3 */ {/*swreg*/44, 10, 22},
/* HWIF_PRED_BC_TAP_7_0 */ {/*swreg*/44, 10, 12},
/* HWIF_PRED_BC_TAP_7_1 */ {/*swreg*/44, 10, 2},
/* HWIF_BINIT_RLIST_B11 */ {/*swreg*/45, 5, 25},
/* HWIF_BINIT_RLIST_F11 */ {/*swreg*/45, 5, 20},
/* HWIF_BINIT_RLIST_B10 */ {/*swreg*/45, 5, 15},
/* HWIF_BINIT_RLIST_F10 */ {/*swreg*/45, 5, 10},
/* HWIF_BINIT_RLIST_B9 */ {/*swreg*/45, 5, 5},
/* HWIF_BINIT_RLIST_F9 */ {/*swreg*/45, 5, 0},
/* HWIF_PRED_BC_TAP_7_2 */ {/*swreg*/45, 10, 22},
/* HWIF_PRED_BC_TAP_7_3 */ {/*swreg*/45, 10, 12},
/* HWIF_PRED_TAP_2_M1 */ {/*swreg*/45, 2, 10},
/* HWIF_PRED_TAP_2_4 */ {/*swreg*/45, 2, 8},
/* HWIF_PRED_TAP_4_M1 */ {/*swreg*/45, 2, 6},
/* HWIF_PRED_TAP_4_4 */ {/*swreg*/45, 2, 4},
/* HWIF_PRED_TAP_6_M1 */ {/*swreg*/45, 2, 2},
/* HWIF_PRED_TAP_6_4 */ {/*swreg*/45, 2, 0},
/* HWIF_BINIT_RLIST_B14 */ {/*swreg*/46, 5, 25},
/* HWIF_BINIT_RLIST_F14 */ {/*swreg*/46, 5, 20},
/* HWIF_BINIT_RLIST_B13 */ {/*swreg*/46, 5, 15},
/* HWIF_BINIT_RLIST_F13 */ {/*swreg*/46, 5, 10},
/* HWIF_BINIT_RLIST_B12 */ {/*swreg*/46, 5, 5},
/* HWIF_BINIT_RLIST_F12 */ {/*swreg*/46, 5, 0},
/* HWIF_QUANT_DELTA_2 */ {/*swreg*/46, 5, 27},
/* HWIF_QUANT_DELTA_3 */ {/*swreg*/46, 5, 22},
/* HWIF_QUANT_2 */ {/*swreg*/46, 11, 11},
/* HWIF_QUANT_3 */ {/*swreg*/46, 11, 0},
/* HWIF_PINIT_RLIST_F3 */ {/*swreg*/47, 5, 25},
/* HWIF_PINIT_RLIST_F2 */ {/*swreg*/47, 5, 20},
/* HWIF_PINIT_RLIST_F1 */ {/*swreg*/47, 5, 15},
/* HWIF_PINIT_RLIST_F0 */ {/*swreg*/47, 5, 10},
/* HWIF_BINIT_RLIST_B15 */ {/*swreg*/47, 5, 5},
/* HWIF_BINIT_RLIST_F15 */ {/*swreg*/47, 5, 0},
/* HWIF_QUANT_DELTA_4 */ {/*swreg*/47, 5, 27},
/* HWIF_QUANT_4 */ {/*swreg*/47, 11, 11},
/* HWIF_QUANT_5 */ {/*swreg*/47, 11, 0},
/* HWIF_STARTMB_X */ {/*swreg*/48, 9, 23},
/* HWIF_STARTMB_Y */ {/*swreg*/48, 8, 15},
/* HWIF_PRED_BC_TAP_0_0 */ {/*swreg*/49, 10, 22},
/* HWIF_PRED_BC_TAP_0_1 */ {/*swreg*/49, 10, 12},
/* HWIF_PRED_BC_TAP_0_2 */ {/*swreg*/49, 10, 2},
/* HWIF_REFBU_E */ {/*swreg*/51, 1, 31},
/* HWIF_REFBU_THR */ {/*swreg*/51, 12, 19},
/* HWIF_REFBU_PICID */ {/*swreg*/51, 5, 14},
/* HWIF_REFBU_EVAL_E */ {/*swreg*/51, 1, 13},
/* HWIF_REFBU_FPARMOD_E */ {/*swreg*/51, 1, 12},
/* HWIF_REFBU_Y_OFFSET */ {/*swreg*/51, 9, 0},
/* HWIF_REFBU_HIT_SUM */ {/*swreg*/52, 16, 16},
/* HWIF_REFBU_INTRA_SUM */ {/*swreg*/52, 16, 0},
/* HWIF_REFBU_Y_MV_SUM */ {/*swreg*/53, 22, 0},
/* HWIF_REFBU2_BUF_E */ {/*swreg*/55, 1, 31},
/* HWIF_REFBU2_THR */ {/*swreg*/55, 12, 19},
/* HWIF_REFBU2_PICID */ {/*swreg*/55, 5, 14},
/* HWIF_APF_THRESHOLD */ {/*swreg*/55, 14, 0},
/* HWIF_REFBU_TOP_SUM */ {/*swreg*/56, 16, 16},
/* HWIF_REFBU_BOT_SUM */ {/*swreg*/56, 16, 0},
/* HWIF_DEC_CH8PIX_BASE */ {/*swreg*/59, 32, 0},
/* HWIF_PP_BUS_INT */ {/*swreg*/60, 1, 13},
/* HWIF_PP_RDY_INT */ {/*swreg*/60, 1, 12},
/* HWIF_PP_IRQ */ {/*swreg*/60, 1, 8},
/* HWIF_PP_IRQ_DIS */ {/*swreg*/60, 1, 4},
/* HWIF_PP_PIPELINE_E */ {/*swreg*/60, 1, 1},
/* HWIF_PP_E */ {/*swreg*/60, 1, 0},
/* HWIF_PP_AXI_RD_ID */ {/*swreg*/61, 8, 24},
/* HWIF_PP_AXI_WR_ID */ {/*swreg*/61, 8, 16},
/* HWIF_PP_AHB_HLOCK_E */ {/*swreg*/61, 1, 15},
/* HWIF_PP_SCMD_DIS */ {/*swreg*/61, 1, 14},
/* HWIF_PP_IN_A2_ENDSEL */ {/*swreg*/61, 1, 13},
/* HWIF_PP_IN_A1_SWAP32 */ {/*swreg*/61, 1, 12},
/* HWIF_PP_IN_A1_ENDIAN */ {/*swreg*/61, 1, 11},
/* HWIF_PP_IN_SWAP32_E */ {/*swreg*/61, 1, 10},
/* HWIF_PP_DATA_DISC_E */ {/*swreg*/61, 1, 9},
/* HWIF_PP_CLK_GATE_E */ {/*swreg*/61, 1, 8},
/* HWIF_PP_IN_ENDIAN */ {/*swreg*/61, 1, 7},
/* HWIF_PP_OUT_ENDIAN */ {/*swreg*/61, 1, 6},
/* HWIF_PP_OUT_SWAP32_E */ {/*swreg*/61, 1, 5},
/* HWIF_PP_MAX_BURST */ {/*swreg*/61, 5, 0},
/* HWIF_DEINT_E */ {/*swreg*/62, 1, 31},
/* HWIF_DEINT_THRESHOLD */ {/*swreg*/62, 14, 16},
/* HWIF_DEINT_BLEND_E */ {/*swreg*/62, 1, 15},
/* HWIF_DEINT_EDGE_DET */ {/*swreg*/62, 15, 0},
/* HWIF_PP_IN_LU_BASE */ {/*swreg*/63, 32, 0},
/* HWIF_PP_IN_CB_BASE */ {/*swreg*/64, 32, 0},
/* HWIF_PP_IN_CR_BASE */ {/*swreg*/65, 32, 0},
/* HWIF_PP_OUT_LU_BASE */ {/*swreg*/66, 32, 0},
/* HWIF_PP_OUT_CH_BASE */ {/*swreg*/67, 32, 0},
/* HWIF_CONTRAST_THR1 */ {/*swreg*/68, 8, 24},
/* HWIF_CONTRAST_OFF2 */ {/*swreg*/68, 10, 10},
/* HWIF_CONTRAST_OFF1 */ {/*swreg*/68, 10, 0},
/* HWIF_PP_IN_START_CH */ {/*swreg*/69, 1, 31},
/* HWIF_PP_IN_CR_FIRST */ {/*swreg*/69, 1, 30},
/* HWIF_PP_OUT_START_CH */ {/*swreg*/69, 1, 29},
/* HWIF_PP_OUT_CR_FIRST */ {/*swreg*/69, 1, 28},
/* HWIF_COLOR_COEFFA2 */ {/*swreg*/69, 10, 18},
/* HWIF_COLOR_COEFFA1 */ {/*swreg*/69, 10, 8},
/* HWIF_CONTRAST_THR2 */ {/*swreg*/69, 8, 0},
/* HWIF_COLOR_COEFFD */ {/*swreg*/70, 10, 20},
/* HWIF_COLOR_COEFFC */ {/*swreg*/70, 10, 10},
/* HWIF_COLOR_COEFFB */ {/*swreg*/70, 10, 0},
/* HWIF_CROP_STARTX */ {/*swreg*/71, 9, 21},
/* HWIF_ROTATION_MODE */ {/*swreg*/71, 3, 18},
/* HWIF_COLOR_COEFFF */ {/*swreg*/71, 8, 10},
/* HWIF_COLOR_COEFFE */ {/*swreg*/71, 10, 0},
/* HWIF_CROP_STARTY */ {/*swreg*/72, 8, 24},
/* HWIF_RANGEMAP_COEF_Y */ {/*swreg*/72, 5, 18},
/* HWIF_PP_IN_HEIGHT */ {/*swreg*/72, 8, 9},
/* HWIF_PP_IN_WIDTH */ {/*swreg*/72, 9, 0},
/* HWIF_PP_BOT_YIN_BASE */ {/*swreg*/73, 32, 0},
/* HWIF_PP_BOT_CIN_BASE */ {/*swreg*/74, 32, 0},
/* HWIF_RANGEMAP_Y_E */ {/*swreg*/79, 1, 31},
/* HWIF_RANGEMAP_C_E */ {/*swreg*/79, 1, 30},
/* HWIF_YCBCR_RANGE */ {/*swreg*/79, 1, 29},
/* HWIF_RGB_PIX_IN32 */ {/*swreg*/79, 1, 28},
/* HWIF_RGB_R_PADD */ {/*swreg*/79, 5, 23},
/* HWIF_RGB_G_PADD */ {/*swreg*/79, 5, 18},
/* HWIF_SCALE_WRATIO */ {/*swreg*/79, 18, 0},
/* HWIF_PP_FAST_SCALE_E */ {/*swreg*/80, 1, 30},
/* HWIF_PP_IN_STRUCT */ {/*swreg*/80, 3, 27},
/* HWIF_HOR_SCALE_MODE */ {/*swreg*/80, 2, 25},
/* HWIF_VER_SCALE_MODE */ {/*swreg*/80, 2, 23},
/* HWIF_RGB_B_PADD */ {/*swreg*/80, 5, 18},
/* HWIF_SCALE_HRATIO */ {/*swreg*/80, 18, 0},
/* HWIF_WSCALE_INVRA */ {/*swreg*/81, 16, 16},
/* HWIF_HSCALE_INVRA */ {/*swreg*/81, 16, 0},
/* HWIF_R_MASK */ {/*swreg*/82, 32, 0},
/* HWIF_G_MASK */ {/*swreg*/83, 32, 0},
/* HWIF_B_MASK */ {/*swreg*/84, 32, 0},
/* HWIF_PP_IN_FORMAT */ {/*swreg*/85, 3, 29},
/* HWIF_PP_OUT_FORMAT */ {/*swreg*/85, 3, 26},
/* HWIF_PP_OUT_HEIGHT */ {/*swreg*/85, 11, 15},
/* HWIF_PP_OUT_WIDTH */ {/*swreg*/85, 11, 4},
/* HWIF_PP_OUT_TILED_E */ {/*swreg*/85, 1, 3},
/* HWIF_PP_OUT_SWAP16_E */ {/*swreg*/85, 1, 2},
/* HWIF_PP_CROP8_R_E */ {/*swreg*/85, 1, 1},
/* HWIF_PP_CROP8_D_E */ {/*swreg*/85, 1, 0},
/* HWIF_PP_IN_FORMAT_ES */ {/*swreg*/86, 3, 29},
/* HWIF_RANGEMAP_COEF_C */ {/*swreg*/86, 5, 23},
/* HWIF_MASK1_ABLEND_E */ {/*swreg*/86, 1, 22},
/* HWIF_MASK1_STARTY */ {/*swreg*/86, 11, 11},
/* HWIF_MASK1_STARTX */ {/*swreg*/86, 11, 0},
/* HWIF_MASK2_ABLEND_E */ {/*swreg*/87, 1, 22},
/* HWIF_MASK2_STARTY */ {/*swreg*/87, 11, 11},
/* HWIF_MASK2_STARTX */ {/*swreg*/87, 11, 0},
/* HWIF_EXT_ORIG_WIDTH */ {/*swreg*/88, 9, 23},
/* HWIF_MASK1_E */ {/*swreg*/88, 1, 22},
/* HWIF_MASK1_ENDY */ {/*swreg*/88, 11, 11},
/* HWIF_MASK1_ENDX */ {/*swreg*/88, 11, 0},
/* HWIF_MASK2_E */ {/*swreg*/89, 1, 22},
/* HWIF_MASK2_ENDY */ {/*swreg*/89, 11, 11},
/* HWIF_MASK2_ENDX */ {/*swreg*/89, 11, 0},
/* HWIF_RIGHT_CROSS_E */ {/*swreg*/90, 1, 29},
/* HWIF_LEFT_CROSS_E */ {/*swreg*/90, 1, 28},
/* HWIF_UP_CROSS_E */ {/*swreg*/90, 1, 27},
/* HWIF_DOWN_CROSS_E */ {/*swreg*/90, 1, 26},
/* HWIF_UP_CROSS */ {/*swreg*/90, 11, 15},
/* HWIF_DOWN_CROSS */ {/*swreg*/90, 11, 0},
/* HWIF_DITHER_SELECT_R */ {/*swreg*/91, 2, 30},
/* HWIF_DITHER_SELECT_G */ {/*swreg*/91, 2, 28},
/* HWIF_DITHER_SELECT_B */ {/*swreg*/91, 2, 26},
/* HWIF_PP_TILED_MODE */ {/*swreg*/91, 2, 22},
/* HWIF_RIGHT_CROSS */ {/*swreg*/91, 11, 11},
/* HWIF_LEFT_CROSS */ {/*swreg*/91, 11, 0},
/* HWIF_PP_IN_H_EXT */ {/*swreg*/92, 3, 29},
/* HWIF_PP_IN_W_EXT */ {/*swreg*/92, 3, 26},
/* HWIF_CROP_STARTY_EXT */ {/*swreg*/92, 3, 23},
/* HWIF_CROP_STARTX_EXT */ {/*swreg*/92, 3, 20},
/* HWIF_DISPLAY_WIDTH */ {/*swreg*/92, 12, 0},
/* HWIF_ABLEND1_BASE */ {/*swreg*/93, 32, 0},
/* HWIF_ABLEND2_BASE */ {/*swreg*/94, 32, 0},
/* HWIF_ABLEND2_SCANL */ {/*swreg*/95, 13, 13},
/* HWIF_ABLEND1_SCANL */ {/*swreg*/95, 13, 0},

View File

@ -0,0 +1,62 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Basic type definitions.
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: basetype.h,v $
-- $Revision: 1.3 $
-- $Date: 2007/11/19 08:26:14 $
--
------------------------------------------------------------------------------*/
#ifndef __BASETYPE_H__
#define __BASETYPE_H__
#if defined( __linux__ ) || defined( WIN32 )
#include <stddef.h>
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
/* Macro to signal unused parameter. */
#define UNUSED(x) (void)(x)
typedef unsigned char u8;
typedef signed char i8;
typedef unsigned short u16;
typedef signed short i16;
typedef unsigned int u32;
typedef signed int i32;
/* SW decoder 16 bits types */
#if defined(VC1SWDEC_16BIT) || defined(MP4ENC_ARM11)
typedef unsigned short u16x;
typedef signed short i16x;
#else
typedef unsigned int u16x;
typedef signed int i16x;
#endif
#endif /* __BASETYPE_H__ */

View File

@ -0,0 +1,48 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Header file for stream decoding utilities
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: bqueue.h,v $
-- $Date: 2010/02/25 12:18:56 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef BQUEUE_H_DEFINED
#define BQUEUE_H_DEFINED
#include "basetype.h"
typedef struct
{
u32 *picI;
u32 ctr;
u32 queueSize;
u32 prevAnchorSlot;
} bufferQueue_t;
#define BQUEUE_UNUSED (u32)(0xffffffff)
u32 BqueueInit( bufferQueue_t *bq, u32 numBuffers );
void BqueueRelease( bufferQueue_t *bq );
u32 BqueueNext( bufferQueue_t *bq, u32 ref0, u32 ref1, u32 ref2, u32 bPic );
void BqueueDiscard( bufferQueue_t *bq, u32 buffer );
#endif /* BQUEUE_H_DEFINED */

View File

@ -0,0 +1,197 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2007 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Common Decoder API definitions
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: decapicommon.h,v $
-- $Date: 2011/05/26 13:14:23 $
-- $Revision: 1.25 $
--
------------------------------------------------------------------------------*/
#ifndef __DECAPICOMMON_H__
#define __DECAPICOMMON_H__
#include "basetype.h"
#define MAX_ASIC_CORES 4
#define MPEG4_NOT_SUPPORTED (u32)(0x00)
#define MPEG4_SIMPLE_PROFILE (u32)(0x01)
#define MPEG4_ADVANCED_SIMPLE_PROFILE (u32)(0x02)
#define MPEG4_CUSTOM_NOT_SUPPORTED (u32)(0x00)
#define MPEG4_CUSTOM_FEATURE_1 (u32)(0x01)
#define H264_NOT_SUPPORTED (u32)(0x00)
#define H264_BASELINE_PROFILE (u32)(0x01)
#define H264_MAIN_PROFILE (u32)(0x02)
#define H264_HIGH_PROFILE (u32)(0x03)
#define VC1_NOT_SUPPORTED (u32)(0x00)
#define VC1_SIMPLE_PROFILE (u32)(0x01)
#define VC1_MAIN_PROFILE (u32)(0x02)
#define VC1_ADVANCED_PROFILE (u32)(0x03)
#define MPEG2_NOT_SUPPORTED (u32)(0x00)
#define MPEG2_MAIN_PROFILE (u32)(0x01)
#define JPEG_NOT_SUPPORTED (u32)(0x00)
#define JPEG_BASELINE (u32)(0x01)
#define JPEG_PROGRESSIVE (u32)(0x02)
#define PP_NOT_SUPPORTED (u32)(0x00)
#define PP_SUPPORTED (u32)(0x01)
#define PP_TILED_4X4 (u32)(0x20000000)
#define PP_DITHERING (u32)(0x10000000)
#define PP_SCALING (u32)(0x0C000000)
#define PP_DEINTERLACING (u32)(0x02000000)
#define PP_ALPHA_BLENDING (u32)(0x01000000)
#define PP_OUTP_ENDIAN (u32)(0x00040000)
#define PP_TILED_INPUT (u32)(0x0000C000)
#define PP_PIX_ACC_OUTPUT (u32)(0x40000000)
#define PP_ABLEND_CROP (u32)(0x80000000)
#define SORENSON_SPARK_NOT_SUPPORTED (u32)(0x00)
#define SORENSON_SPARK_SUPPORTED (u32)(0x01)
#define VP6_NOT_SUPPORTED (u32)(0x00)
#define VP6_SUPPORTED (u32)(0x01)
#define VP7_NOT_SUPPORTED (u32)(0x00)
#define VP7_SUPPORTED (u32)(0x01)
#define VP8_NOT_SUPPORTED (u32)(0x00)
#define VP8_SUPPORTED (u32)(0x01)
#define REF_BUF_NOT_SUPPORTED (u32)(0x00)
#define REF_BUF_SUPPORTED (u32)(0x01)
#define REF_BUF_INTERLACED (u32)(0x02)
#define REF_BUF_DOUBLE (u32)(0x04)
#define TILED_NOT_SUPPORTED (u32)(0x00)
#define TILED_8x4_SUPPORTED (u32)(0x01)
#define AVS_NOT_SUPPORTED (u32)(0x00)
#define AVS_SUPPORTED (u32)(0x01)
#define JPEG_EXT_NOT_SUPPORTED (u32)(0x00)
#define JPEG_EXT_SUPPORTED (u32)(0x01)
#define RV_NOT_SUPPORTED (u32)(0x00)
#define RV_SUPPORTED (u32)(0x01)
#define MVC_NOT_SUPPORTED (u32)(0x00)
#define MVC_SUPPORTED (u32)(0x01)
#define WEBP_NOT_SUPPORTED (u32)(0x00)
#define WEBP_SUPPORTED (u32)(0x01)
#define EC_NOT_SUPPORTED (u32)(0x00)
#define EC_SUPPORTED (u32)(0x01)
#define H264_NOT_SUPPORTED_FUSE (u32)(0x00)
#define H264_FUSE_ENABLED (u32)(0x01)
#define MPEG4_NOT_SUPPORTED_FUSE (u32)(0x00)
#define MPEG4_FUSE_ENABLED (u32)(0x01)
#define MPEG2_NOT_SUPPORTED_FUSE (u32)(0x00)
#define MPEG2_FUSE_ENABLED (u32)(0x01)
#define SORENSON_SPARK_NOT_SUPPORTED_FUSE (u32)(0x00)
#define SORENSON_SPARK_ENABLED (u32)(0x01)
#define JPEG_NOT_SUPPORTED_FUSE (u32)(0x00)
#define JPEG_FUSE_ENABLED (u32)(0x01)
#define VP6_NOT_SUPPORTED_FUSE (u32)(0x00)
#define VP6_FUSE_ENABLED (u32)(0x01)
#define VP7_NOT_SUPPORTED_FUSE (u32)(0x00)
#define VP7_FUSE_ENABLED (u32)(0x01)
#define VP8_NOT_SUPPORTED_FUSE (u32)(0x00)
#define VP8_FUSE_ENABLED (u32)(0x01)
#define VC1_NOT_SUPPORTED_FUSE (u32)(0x00)
#define VC1_FUSE_ENABLED (u32)(0x01)
#define JPEG_PROGRESSIVE_NOT_SUPPORTED_FUSE (u32)(0x00)
#define JPEG_PROGRESSIVE_FUSE_ENABLED (u32)(0x01)
#define REF_BUF_NOT_SUPPORTED_FUSE (u32)(0x00)
#define REF_BUF_FUSE_ENABLED (u32)(0x01)
#define AVS_NOT_SUPPORTED_FUSE (u32)(0x00)
#define AVS_FUSE_ENABLED (u32)(0x01)
#define RV_NOT_SUPPORTED_FUSE (u32)(0x00)
#define RV_FUSE_ENABLED (u32)(0x01)
#define MVC_NOT_SUPPORTED_FUSE (u32)(0x00)
#define MVC_FUSE_ENABLED (u32)(0x01)
#define PP_NOT_SUPPORTED_FUSE (u32)(0x00)
#define PP_FUSE_ENABLED (u32)(0x01)
#define PP_FUSE_DEINTERLACING_ENABLED (u32)(0x40000000)
#define PP_FUSE_ALPHA_BLENDING_ENABLED (u32)(0x20000000)
#define MAX_PP_OUT_WIDHT_1920_FUSE_ENABLED (u32)(0x00008000)
#define MAX_PP_OUT_WIDHT_1280_FUSE_ENABLED (u32)(0x00004000)
#define MAX_PP_OUT_WIDHT_720_FUSE_ENABLED (u32)(0x00002000)
#define MAX_PP_OUT_WIDHT_352_FUSE_ENABLED (u32)(0x00001000)
/* Macro to copy support flags and picture max width from DWL HW config
* to Decoder HW config */
#define SET_DEC_BUILD_SUPPORT(decHwCfg, dwlHwCfg) \
decHwCfg.maxDecPicWidth = dwlHwCfg.maxDecPicWidth; \
decHwCfg.maxPpOutPicWidth = dwlHwCfg.maxPpOutPicWidth; \
decHwCfg.h264Support = dwlHwCfg.h264Support; \
decHwCfg.jpegSupport = dwlHwCfg.jpegSupport; \
decHwCfg.jpegESupport = dwlHwCfg.jpegESupport; \
decHwCfg.mpeg2Support = dwlHwCfg.mpeg2Support; \
decHwCfg.mpeg4Support = dwlHwCfg.mpeg4Support; \
decHwCfg.vc1Support = dwlHwCfg.vc1Support; \
decHwCfg.ppSupport = dwlHwCfg.ppSupport; \
decHwCfg.ppConfig = dwlHwCfg.ppConfig; \
decHwCfg.sorensonSparkSupport = dwlHwCfg.sorensonSparkSupport; \
decHwCfg.vp6Support = dwlHwCfg.vp6Support; \
decHwCfg.vp7Support = dwlHwCfg.vp7Support; \
decHwCfg.vp8Support = dwlHwCfg.vp8Support; \
decHwCfg.refBufSupport = dwlHwCfg.refBufSupport; \
decHwCfg.tiledModeSupport = dwlHwCfg.tiledModeSupport; \
decHwCfg.avsSupport = dwlHwCfg.avsSupport; \
decHwCfg.rvSupport = dwlHwCfg.rvSupport; \
decHwCfg.customMpeg4Support = dwlHwCfg.customMpeg4Support; \
decHwCfg.mvcSupport = dwlHwCfg.mvcSupport; \
decHwCfg.webpSupport = dwlHwCfg.webpSupport; \
decHwCfg.ecSupport = dwlHwCfg.ecSupport;
typedef struct DecHwConfig_
{
u32 mpeg4Support; /* one of the MPEG4 values defined above */
u32 customMpeg4Support; /* one of the MPEG4 custom values defined above */
u32 h264Support; /* one of the H264 values defined above */
u32 vc1Support; /* one of the VC1 values defined above */
u32 mpeg2Support; /* one of the MPEG2 values defined above */
u32 jpegSupport; /* one of the JPEG values defined above */
u32 jpegProgSupport; /* one of the Progressive JPEG values defined above */
u32 maxDecPicWidth; /* maximum picture width in decoder */
u32 ppSupport; /* PP_SUPPORTED or PP_NOT_SUPPORTED */
u32 ppConfig; /* Bitwise list of PP function */
u32 maxPpOutPicWidth; /* maximum post-processor output picture width */
u32 sorensonSparkSupport; /* one of the SORENSON_SPARK values defined above */
u32 refBufSupport; /* one of the REF_BUF values defined above */
u32 tiledModeSupport; /* one of the TILED values defined above */
u32 vp6Support; /* one of the VP6 values defined above */
u32 vp7Support; /* one of the VP7 values defined above */
u32 vp8Support; /* one of the VP8 values defined above */
u32 avsSupport; /* one of the AVS values defined above */
u32 jpegESupport; /* one of the JPEG EXT values defined above */
u32 rvSupport; /* one of the HUKKA values defined above */
u32 mvcSupport; /* one of the MVC values defined above */
u32 webpSupport; /* one of the WEBP values defined above */
u32 ecSupport; /* one of the EC values defined above */
u32 strideSupport; /* HW supports separate Y and C strides */
u32 fieldDpbSupport;
} DecHwConfig;
/* Reference picture format types */
typedef enum
{
DEC_REF_FRM_RASTER_SCAN = 0,
DEC_REF_FRM_TILED_DEFAULT = 1
} DecRefFrmFormat;
/* Output picture format types */
typedef enum
{
DEC_OUT_FRM_RASTER_SCAN = 0,
DEC_OUT_FRM_TILED_8X4 = 1
} DecOutFrmFormat;
#endif /* __DECAPICOMMON_H__ */

View File

@ -0,0 +1,229 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Hardware decoder system configuration
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: deccfg.h,v $
-- $Revision: 1.16 $
-- $Date: 2010/05/14 10:45:43 $
--
------------------------------------------------------------------------------*/
#ifndef __DEC_X170_CFG_H__
#define __DEC_X170_CFG_H__
/* predefined values of HW system parameters. DO NOT ALTER! */
#define DEC_X170_LITTLE_ENDIAN 1
#define DEC_X170_BIG_ENDIAN 0
#define DEC_X170_BUS_BURST_LENGTH_UNDEFINED 0
#define DEC_X170_BUS_BURST_LENGTH_4 4
#define DEC_X170_BUS_BURST_LENGTH_8 8
#define DEC_X170_BUS_BURST_LENGTH_16 16
#define DEC_X170_ASIC_SERVICE_PRIORITY_DEFAULT 0
#define DEC_X170_ASIC_SERVICE_PRIORITY_WR_1 1
#define DEC_X170_ASIC_SERVICE_PRIORITY_WR_2 2
#define DEC_X170_ASIC_SERVICE_PRIORITY_RD_1 3
#define DEC_X170_ASIC_SERVICE_PRIORITY_RD_2 4
#define DEC_X170_OUTPUT_FORMAT_RASTER_SCAN 0
#define DEC_X170_OUTPUT_FORMAT_TILED 1
/* end of predefined values */
/* now what we use */
#ifndef DEC_X170_USING_IRQ
/* Control IRQ generation by decoder hardware */
#define DEC_X170_USING_IRQ 1
#endif
#ifndef DEC_X170_ASIC_SERVICE_PRIORITY
/* hardware intgernal prioriy scheme. better left unchanged */
#define DEC_X170_ASIC_SERVICE_PRIORITY DEC_X170_ASIC_SERVICE_PRIORITY_DEFAULT
#endif
/* AXI single command multiple data disable not set */
#define DEC_X170_SCMD_DISABLE 0
/* Advanced prefetch disable flag. If disable flag is set, product shall
* operate akin to 9190 and earlier products. */
#define DEC_X170_APF_DISABLE 0
#ifndef DEC_X170_BUS_BURST_LENGTH
/* how long are the hardware data bursts; better left unchanged */
#define DEC_X170_BUS_BURST_LENGTH DEC_X170_BUS_BURST_LENGTH_16
#endif
#ifndef DEC_X170_INPUT_STREAM_ENDIAN
/* this should match the system endianess, so that Decoder reads */
/* the input stream in the right order */
#define DEC_X170_INPUT_STREAM_ENDIAN DEC_X170_LITTLE_ENDIAN
#endif
#ifndef DEC_X170_OUTPUT_PICTURE_ENDIAN
/* this should match the system endianess, so that Decoder writes */
/* the output pixel data in the right order */
#define DEC_X170_OUTPUT_PICTURE_ENDIAN DEC_X170_LITTLE_ENDIAN
#endif
#ifndef DEC_X170_LATENCY_COMPENSATION
/* compensation for bus latency; values up to 63 */
#define DEC_X170_LATENCY_COMPENSATION 0
#endif
#ifndef DEC_X170_INTERNAL_CLOCK_GATING
/* clock is gated from decoder structures that are not used */
#define DEC_X170_INTERNAL_CLOCK_GATING 0
#endif
#ifndef DEC_X170_OUTPUT_FORMAT
/* Decoder output picture format in external memory: Raster-scan or */
/*macroblock tiled i.e. macroblock data written in consecutive addresses */
#define DEC_X170_OUTPUT_FORMAT DEC_X170_OUTPUT_FORMAT_RASTER_SCAN
#endif
#ifndef DEC_X170_DATA_DISCARD_ENABLE
#define DEC_X170_DATA_DISCARD_ENABLE 0
#endif
/* Decoder output data swap for 32bit words*/
#ifndef DEC_X170_OUTPUT_SWAP_32_ENABLE
#define DEC_X170_OUTPUT_SWAP_32_ENABLE 1
#endif
/* Decoder input data swap(excluding stream data) for 32bit words*/
#ifndef DEC_X170_INPUT_DATA_SWAP_32_ENABLE
#define DEC_X170_INPUT_DATA_SWAP_32_ENABLE 1
#endif
/* Decoder input stream swap for 32bit words */
#ifndef DEC_X170_INPUT_STREAM_SWAP_32_ENABLE
#define DEC_X170_INPUT_STREAM_SWAP_32_ENABLE 1
#endif
/* Decoder input data endian. Do not modify this! */
#ifndef DEC_X170_INPUT_DATA_ENDIAN
#define DEC_X170_INPUT_DATA_ENDIAN DEC_X170_BIG_ENDIAN
#endif
/* AXI bus read and write ID values used by HW. 0 - 255 */
#ifndef DEC_X170_AXI_ID_R
#define DEC_X170_AXI_ID_R 0
#endif
#ifndef DEC_X170_AXI_ID_W
#define DEC_X170_AXI_ID_W 0
#endif
/* Check validity of values */
/* data discard and tiled mode can not be on simultaneously */
#if (DEC_X170_DATA_DISCARD_ENABLE && (DEC_X170_OUTPUT_FORMAT == DEC_X170_OUTPUT_FORMAT_TILED))
#error "Bad value specified: DEC_X170_DATA_DISCARD_ENABLE && (DEC_X170_OUTPUT_FORMAT == DEC_X170_OUTPUT_FORMAT_TILED)"
#endif
#if (DEC_X170_OUTPUT_PICTURE_ENDIAN > 1)
#error "Bad value specified for DEC_X170_OUTPUT_PICTURE_ENDIAN"
#endif
#if (DEC_X170_OUTPUT_FORMAT > 1)
#error "Bad value specified for DEC_X170_OUTPUT_FORMAT"
#endif
#if (DEC_X170_BUS_BURST_LENGTH > 31)
#error "Bad value specified for DEC_X170_AMBA_BURST_LENGTH"
#endif
#if (DEC_X170_ASIC_SERVICE_PRIORITY > 4)
#error "Bad value specified for DEC_X170_ASIC_SERVICE_PRIORITY"
#endif
#if (DEC_X170_LATENCY_COMPENSATION > 63)
#error "Bad value specified for DEC_X170_LATENCY_COMPENSATION"
#endif
#if (DEC_X170_OUTPUT_SWAP_32_ENABLE > 1)
#error "Bad value specified for DEC_X170_OUTPUT_SWAP_32_ENABLE"
#endif
#if (DEC_X170_INPUT_DATA_SWAP_32_ENABLE > 1)
#error "Bad value specified for DEC_X170_INPUT_DATA_SWAP_32_ENABLE"
#endif
#if (DEC_X170_INPUT_STREAM_SWAP_32_ENABLE > 1)
#error "Bad value specified for DEC_X170_INPUT_STREAM_SWAP_32_ENABLE"
#endif
#if (DEC_X170_OUTPUT_SWAP_32_ENABLE > 1)
#error "Bad value specified for DEC_X170_INPUT_DATA_ENDIAN"
#endif
#if (DEC_X170_DATA_DISCARD_ENABLE > 1)
#error "Bad value specified for DEC_X170_DATA_DISCARD_ENABLE"
#endif
/* Common defines for the decoder */
/* Number registers for the decoder */
#define DEC_X170_REGISTERS 60
/* Max amount of stream */
#define DEC_X170_MAX_STREAM ((1<<24)-1)
/* Timeout value for the DWLWaitHwReady() call. */
/* Set to -1 for an unspecified value */
#ifndef DEC_X170_TIMEOUT_LENGTH
#define DEC_X170_TIMEOUT_LENGTH -1
#endif
/* Enable HW internal watchdog timeout IRQ */
#define DEC_X170_HW_TIMEOUT_INT_ENA 1
/* Memory wait states for reference buffer */
#define DEC_X170_REFBU_WIDTH 64
#define DEC_X170_REFBU_LATENCY 20
#define DEC_X170_REFBU_NONSEQ 8
#define DEC_X170_REFBU_SEQ 1
#define DEC_SET_APF_THRESHOLD(regBase) \
{ \
u32 apfTmpThreshold = 0; \
SetDecRegister(regBase, HWIF_DEC_ADV_PRE_DIS, DEC_X170_APF_DISABLE ); \
if((DEC_X170_APF_DISABLE) == 0) \
{ \
if(DEC_X170_REFBU_SEQ) \
apfTmpThreshold = DEC_X170_REFBU_NONSEQ/DEC_X170_REFBU_SEQ; \
else \
apfTmpThreshold = DEC_X170_REFBU_NONSEQ; \
if( apfTmpThreshold > 63 ) \
apfTmpThreshold = 63; \
} \
SetDecRegister(regBase, HWIF_APF_THRESHOLD, apfTmpThreshold ); \
}
/* Check validity of the stream addresses */
#define X170_CHECK_BUS_ADDRESS(d) ((d) < 64 ? 1 : 0)
#define X170_CHECK_VIRTUAL_ADDRESS(d) (((void*)(d) < (void*)64) ? 1 : 0)
#endif /* __DEC_X170_CFG_H__ */

View File

@ -0,0 +1,110 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : interface between pp and decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: decppif.h,v $
-- $Date: 2010/12/02 10:53:50 $
-- $Revision: 1.16 $
--
------------------------------------------------------------------------------*/
#ifndef _PPDEC_H_
#define _PPDEC_H_
#include "basetype.h"
/* PP input types (picStruct) */
/* Frame or top field */
#define DECPP_PIC_FRAME_OR_TOP_FIELD 0U
/* Bottom field only */
#define DECPP_PIC_BOT_FIELD 1U
/* top and bottom is separate locations */
#define DECPP_PIC_TOP_AND_BOT_FIELD 2U
/* top and bottom interleaved */
#define DECPP_PIC_TOP_AND_BOT_FIELD_FRAME 3U
/* interleaved top only */
#define DECPP_PIC_TOP_FIELD_FRAME 4U
/* interleaved bottom only */
#define DECPP_PIC_BOT_FIELD_FRAME 5U
/* Control interface between decoder and pp */
/* decoder writes, pp read-only */
typedef struct DecPpInterface_
{
enum
{
DECPP_IDLE = 0,
DECPP_RUNNING, /* PP was started */
DECPP_PIC_READY, /* PP has finished a picture */
DECPP_PIC_NOT_FINISHED /* PP still processing a picture */
} ppStatus; /* Decoder keeps track of what it asked the pp to do */
enum
{
MULTIBUFFER_UNINIT = 0, /* buffering mode not yet decided */
MULTIBUFFER_DISABLED, /* Single buffer legacy mode */
MULTIBUFFER_SEMIMODE, /* enabled but full pipel cannot be used */
MULTIBUFFER_FULLMODE /* enabled and full pipeline successful */
} multiBufStat;
u32 inputBusLuma;
u32 inputBusChroma;
u32 bottomBusLuma;
u32 bottomBusChroma;
u32 picStruct; /* structure of input picture */
u32 topField;
u32 inwidth;
u32 inheight;
u32 usePipeline;
u32 littleEndian;
u32 wordSwap;
u32 croppedW;
u32 croppedH;
u32 bufferIndex; /* multibuffer, where to put PP output */
u32 displayIndex; /* multibuffer, next picture in display order */
u32 prevAnchorDisplayIndex;
/* VC-1 */
u32 rangeRed;
u32 rangeMapYEnable;
u32 rangeMapYCoeff;
u32 rangeMapCEnable;
u32 rangeMapCCoeff;
u32 tiledMode;
} DecPpInterface;
/* Decoder asks with this struct information about pp setup */
/* pp writes, decoder read-only */
typedef struct DecPpQuery_
{
/* Dec-to-PP direction */
u32 tiledMode;
/* PP-to-Dec direction */
u32 pipelineAccepted; /* PP accepts pipeline */
u32 deinterlace; /* Deinterlace feature used */
u32 multiBuffer; /* multibuffer PP output enabled */
u32 ppConfigChanged; /* PP config changed after previous output */
} DecPpQuery;
#endif

View File

@ -0,0 +1,180 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Sytem Wrapper Layer
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: dwl.h,v $
-- $Revision: 1.21 $
-- $Date: 2010/12/01 12:31:03 $
--
------------------------------------------------------------------------------*/
#ifndef __DWL_H__
#define __DWL_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include "basetype.h"
#include "decapicommon.h"
#define DWL_OK 0
#define DWL_ERROR -1
#define DWL_HW_WAIT_OK DWL_OK
#define DWL_HW_WAIT_ERROR DWL_ERROR
#define DWL_HW_WAIT_TIMEOUT 1
#define DWL_CLIENT_TYPE_H264_DEC 1U
#define DWL_CLIENT_TYPE_MPEG4_DEC 2U
#define DWL_CLIENT_TYPE_JPEG_DEC 3U
#define DWL_CLIENT_TYPE_PP 4U
#define DWL_CLIENT_TYPE_VC1_DEC 5U
#define DWL_CLIENT_TYPE_MPEG2_DEC 6U
#define DWL_CLIENT_TYPE_VP6_DEC 7U
#define DWL_CLIENT_TYPE_AVS_DEC 9U /* TODO: fix */
#define DWL_CLIENT_TYPE_RV_DEC 8U
#define DWL_CLIENT_TYPE_VP8_DEC 10U
/* Linear memory area descriptor */
typedef struct DWLLinearMem
{
u32 *virtualAddress;
u32 busAddress;
u32 size;
} DWLLinearMem_t;
/* DWLInitParam is used to pass parameters when initializing the DWL */
typedef struct DWLInitParam
{
u32 clientType;
} DWLInitParam_t;
/* Hardware configuration description */
typedef struct DWLHwConfig
{
u32 maxDecPicWidth; /* Maximum video decoding width supported */
u32 maxPpOutPicWidth; /* Maximum output width of Post-Processor */
u32 h264Support; /* HW supports h.264 */
u32 jpegSupport; /* HW supports JPEG */
u32 mpeg4Support; /* HW supports MPEG-4 */
u32 customMpeg4Support; /* HW supports custom MPEG-4 features */
u32 vc1Support; /* HW supports VC-1 Simple */
u32 mpeg2Support; /* HW supports MPEG-2 */
u32 ppSupport; /* HW supports post-processor */
u32 ppConfig; /* HW post-processor functions bitmask */
u32 sorensonSparkSupport; /* HW supports Sorenson Spark */
u32 refBufSupport; /* HW supports reference picture buffering */
u32 tiledModeSupport; /* HW supports tiled reference pictuers */
u32 vp6Support; /* HW supports VP6 */
u32 vp7Support; /* HW supports VP7 */
u32 vp8Support; /* HW supports VP8 */
u32 avsSupport; /* HW supports AVS */
u32 jpegESupport; /* HW supports JPEG extensions */
u32 rvSupport; /* HW supports REAL */
u32 mvcSupport; /* HW supports H264 MVC extension */
u32 webpSupport; /* HW supports WebP (VP8 snapshot) */
u32 ecSupport; /* one of the EC values defined above */
u32 strideSupport; /* HW supports separate Y and C strides */
u32 fieldDpbSupport;
} DWLHwConfig_t;
typedef struct DWLHwFuseStatus
{
u32 h264SupportFuse; /* HW supports h.264 */
u32 mpeg4SupportFuse; /* HW supports MPEG-4 */
u32 mpeg2SupportFuse; /* HW supports MPEG-2 */
u32 sorensonSparkSupportFuse; /* HW supports Sorenson Spark */
u32 jpegSupportFuse; /* HW supports JPEG */
u32 vp6SupportFuse; /* HW supports VP6 */
u32 vp7SupportFuse; /* HW supports VP6 */
u32 vp8SupportFuse; /* HW supports VP6 */
u32 vc1SupportFuse; /* HW supports VC-1 Simple */
u32 jpegProgSupportFuse; /* HW supports Progressive JPEG */
u32 ppSupportFuse; /* HW supports post-processor */
u32 ppConfigFuse; /* HW post-processor functions bitmask */
u32 maxDecPicWidthFuse; /* Maximum video decoding width supported */
u32 maxPpOutPicWidthFuse; /* Maximum output width of Post-Processor */
u32 refBufSupportFuse; /* HW supports reference picture buffering */
u32 avsSupportFuse; /* one of the AVS values defined above */
u32 rvSupportFuse; /* one of the REAL values defined above */
u32 mvcSupportFuse;
u32 customMpeg4SupportFuse; /* Fuse for custom MPEG-4 */
} DWLHwFuseStatus_t;
/* HW ID retriving, static implementation */
u32 DWLReadAsicID(void);
/* HW configuration retrieving, static implementation */
void DWLReadAsicConfig(DWLHwConfig_t * pHwCfg);
/* HW fuse retrieving, static implementation */
void DWLReadAsicFuseStatus(DWLHwFuseStatus_t * pHwFuseSts);
/* DWL initilaization and release */
const void *DWLInit(DWLInitParam_t * param);
i32 DWLRelease(const void *instance);
/* HW sharing */
i32 DWLReserveHw(const void *instance);
void DWLReleaseHw(const void *instance);
/* Frame buffers memory */
i32 DWLMallocRefFrm(const void *instance, u32 size, DWLLinearMem_t * info);
void DWLFreeRefFrm(const void *instance, DWLLinearMem_t * info);
/* SW/HW shared memory */
i32 DWLMallocLinear(const void *instance, u32 size, DWLLinearMem_t * info);
void DWLFreeLinear(const void *instance, DWLLinearMem_t * info);
/* D-Cache coherence */
void DWLDCacheRangeFlush(const void *instance, DWLLinearMem_t * info); /* NOT in use */
void DWLDCacheRangeRefresh(const void *instance, DWLLinearMem_t * info); /* NOT in use */
/* Register access */
void DWLWriteReg(const void *instance, u32 offset, u32 value);
u32 DWLReadReg(const void *instance, u32 offset);
void DWLWriteRegAll(const void *instance, const u32 * table, u32 size); /* NOT in use */
void DWLReadRegAll(const void *instance, u32 * table, u32 size); /* NOT in use */
/* HW starting/stopping */
void DWLEnableHW(const void *instance, u32 offset, u32 value);
void DWLDisableHW(const void *instance, u32 offset, u32 value);
/* HW synchronization */
i32 DWLWaitHwReady(const void *instance, u32 timeout);
/* SW/SW shared memory */
void *DWLmalloc(u32 n);
void DWLfree(void *p);
void *DWLcalloc(u32 n, u32 s);
void *DWLmemcpy(void *d, const void *s, u32 n);
void *DWLmemset(void *d, i32 c, u32 n);
void DWLSoftResetAsic(void);
#ifdef __cplusplus
}
#endif
#endif /* __DWL_H__ */

View File

@ -0,0 +1,75 @@
/*------------------------------------------------------------------------------
-- Copyright (c) 2015-2017, VeriSilicon Inc. All rights reserved --
-- Copyright (c) 2011-2014, Google Inc. All rights reserved. --
-- Copyright (c) 2007-2010, Hantro OY. All rights reserved. --
-- --
-- This software is confidential and proprietary and may be used only as --
-- expressly authorized by VeriSilicon in a written licensing agreement. --
-- --
-- This entire notice must be reproduced on all copies --
-- and may not be removed. --
-- --
--------------------------------------------------------------------------------
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are met:--
-- * Redistributions of source code must retain the above copyright notice, --
-- this list of conditions and the following disclaimer. --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- * Neither the names of Google nor the names of its contributors may be --
-- used to endorse or promote products derived from this software --
-- without specific prior written permission. --
--------------------------------------------------------------------------------
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"--
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE --
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE --
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE --
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS --
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN --
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) --
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE --
-- POSSIBILITY OF SUCH DAMAGE. --
--------------------------------------------------------------------------------
------------------------------------------------------------------------------*/
#ifndef SOFTWARE_LINUX_DWL_DWL_DEFS_H_
#define SOFTWARE_LINUX_DWL_DWL_DEFS_H_
#define DWL_MPEG2_E 31 /* 1 bit */
#define DWL_VC1_E 29 /* 2 bits */
#define DWL_JPEG_E 28 /* 1 bit */
#define DWL_MPEG4_E 26 /* 2 bits */
#define DWL_H264_E 24 /* 2 bits */
#define DWL_VP6_E 23 /* 1 bit */
#define DWL_RV_E 26 /* 2 bits */
#define DWL_VP8_E 23 /* 1 bit */
#define DWL_VP7_E 24 /* 1 bit */
#define DWL_WEBP_E 19 /* 1 bit */
#define DWL_AVS_E 22 /* 1 bit */
#define DWL_PP_E 16 /* 1 bit */
#define HX170_IRQ_STAT_DEC 1
#define HX170_IRQ_STAT_DEC_OFF (HX170_IRQ_STAT_DEC * 4)
#define HX170_IRQ_STAT_PP 60
#define HX170_IRQ_STAT_PP_OFF (HX170_IRQ_STAT_PP * 4)
#define HX170PP_SYNTH_CFG 100
#define HX170PP_SYNTH_CFG_OFF (HX170PP_SYNTH_CFG * 4)
#define HX170DEC_SYNTH_CFG 50
#define HX170DEC_SYNTH_CFG_OFF (HX170DEC_SYNTH_CFG * 4)
#define HX170DEC_SYNTH_CFG_2 54
#define HX170DEC_SYNTH_CFG_2_OFF (HX170DEC_SYNTH_CFG_2 * 4)
#define HX170_DEC_E 0x01
#define HX170_PP_E 0x01
#define HX170_DEC_ABORT 0x20
#define HX170_DEC_IRQ_DISABLE 0x10
#define HX170_PP_IRQ_DISABLE 0x10
#define HX170_DEC_IRQ 0x100
#define HX170_PP_IRQ 0x100
#endif /* SOFTWARE_LINUX_DWL_DWL_DEFS_H_ */

View File

@ -0,0 +1,69 @@
#include "basetype.h"
#include "dwl.h"
//#define _DWL_DEBUG
#ifdef _DWL_DEBUG
#define DWL_DEBUG(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__ , ## args)
#else
#define DWL_DEBUG(fmt, args...) /* not debugging: nothing */
#endif
#ifndef HX170DEC_IO_BASE
#define HX170DEC_IO_BASE 0xC0000000U
#endif
#define HX170PP_REG_START 0xF0
#define HX170DEC_REG_START 0x4
#define HX170PP_SYNTH_CFG 100
#define HX170DEC_SYNTH_CFG 50
#define HX170DEC_SYNTH_CFG_2 54
#define HX170PP_FUSE_CFG 99
#define HX170DEC_FUSE_CFG 57
#define DWL_DECODER_INT ((DWLReadReg(dec_dwl, HX170DEC_REG_START) >> 12) & 0xFFU)
#define DWL_PP_INT ((DWLReadReg(dec_dwl, HX170PP_REG_START) >> 12) & 0xFFU)
#define DEC_IRQ_ABORT (1 << 11)
#define DEC_IRQ_RDY (1 << 12)
#define DEC_IRQ_BUS (1 << 13)
#define DEC_IRQ_BUFFER (1 << 14)
#define DEC_IRQ_ASO (1 << 15)
#define DEC_IRQ_ERROR (1 << 16)
#define DEC_IRQ_SLICE (1 << 17)
#define DEC_IRQ_TIMEOUT (1 << 18)
#define PP_IRQ_RDY (1 << 12)
#define PP_IRQ_BUS (1 << 13)
#define DWL_STREAM_ERROR_BIT 0x010000 /* 16th bit */
#define DWL_HW_TIMEOUT_BIT 0x040000 /* 18th bit */
#define DWL_HW_ENABLE_BIT 0x000001 /* 0th bit */
#define DWL_HW_PIC_RDY_BIT 0x001000 /* 12th bit */
#ifdef _DWL_HW_PERFORMANCE
/* signal that decoder/pp is enabled */
void DwlDecoderEnable(void);
void DwlPpEnable(void);
#endif
/* Function prototypes */
/* wrapper information */
typedef struct hX170dwl
{
u32 clientType;
u32 numCores;
volatile u32 *pRegBase; /* IO mem base */
u32 regSize; /* IO mem size */
u32 freeLinMem; /* Start address of free linear memory */
u32 freeRefFrmMem; /* Start address of free reference frame memory */
int semid;
int sigio_needed;
u32 bPPReserved;
} hX170dwl_t;
i32 DWLWaitPpHwReady(const void *instance, u32 timeout);
i32 DWLWaitDecHwReady(const void *instance, u32 timeout);
void DWLSoftResetAsic(void);

View File

@ -0,0 +1,41 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
-
- Description : Dec/PP multibuiffer handling
-
--------------------------------------------------------------------------------
-
- Version control information, please leave untouched.
-
- $RCSfile: h264_pp_multibuffer.h,v $
- $Revision: 1.1 $
- $Date: 2008/08/27 11:59:54 $
-
------------------------------------------------------------------------------*/
#ifndef H264_PP_MULTIBUFFER_H
#define H264_PP_MULTIBUFFER_H
#include "basetype.h"
#include "dwl.h"
#include "h264hwd_container.h"
void h264PpMultiInit(decContainer_t * pDecCont, u32 maxBuff);
u32 h264PpMultiAddPic(decContainer_t * pDecCont, const DWLLinearMem_t * data);
u32 h264PpMultiRemovePic(decContainer_t * pDecCont,
const DWLLinearMem_t * data);
u32 h264PpMultiFindPic(decContainer_t * pDecCont, const DWLLinearMem_t * data);
#endif /* H264_PP_MULTIBUFFER_H */

View File

@ -0,0 +1,43 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : H264 decoder and PP pipeline support
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264_pp_pipeline.h,v $
-- $Date: 2010/07/23 09:51:27 $
-- $Revision: 1.6 $
--
------------------------------------------------------------------------------*/
#ifndef H264_PP_PIPELINE_H
#define H264_PP_PIPELINE_H
#include "decppif.h"
i32 h264RegisterPP(const void *decInst, const void *ppInst,
void (*PPDecStart) (const void *, const DecPpInterface *),
void (*PPDecWaitEnd) (const void *),
void (*PPConfigQuery) (const void *, DecPpQuery *),
void (*PPDisplayIndex) (const void *, u32));
i32 h264UnregisterPP(const void *decInst, const void *ppInst);
u32 h264UseDisplaySmoothing(const void *decInst);
#endif /* #ifdef H264_PP_PIPELINE_H */

View File

@ -0,0 +1,193 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : API of H.264 Decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264decapi.h,v $
-- $Date: 2010/02/17 13:28:46 $
-- $Revision: 1.9 $
--
------------------------------------------------------------------------------*/
#ifndef __H264DECAPI_H__
#define __H264DECAPI_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include "basetype.h"
#include "decapicommon.h"
/*------------------------------------------------------------------------------
API type definitions
------------------------------------------------------------------------------*/
/* Return values */
typedef enum H264DecRet_
{
H264DEC_OK = 0,
H264DEC_STRM_PROCESSED = 1,
H264DEC_PIC_RDY = 2,
H264DEC_PIC_DECODED = 3,
H264DEC_HDRS_RDY = 4,
H264DEC_ADVANCED_TOOLS = 5,
H264DEC_PENDING_FLUSH = 6,
H264DEC_PARAM_ERROR = -1,
H264DEC_STRM_ERROR = -2,
H264DEC_NOT_INITIALIZED = -3,
H264DEC_MEMFAIL = -4,
H264DEC_INITFAIL = -5,
H264DEC_HDRS_NOT_RDY = -6,
H264DEC_STREAM_NOT_SUPPORTED = -8,
H264DEC_HW_RESERVED = -254,
H264DEC_HW_TIMEOUT = -255,
H264DEC_HW_BUS_ERROR = -256,
H264DEC_SYSTEM_ERROR = -257,
H264DEC_DWL_ERROR = -258,
H264DEC_EVALUATION_LIMIT_EXCEEDED = -999,
H264DEC_FORMAT_NOT_SUPPORTED = -1000
} H264DecRet;
/* decoder output picture format */
typedef enum H264DecOutFormat_
{
H264DEC_SEMIPLANAR_YUV420 = 0x020001,
H264DEC_TILED_YUV420 = 0x020002,
H264DEC_YUV400 = 0x080000
} H264DecOutFormat;
/* Decoder instance */
typedef const void *H264DecInst;
/* Input structure */
typedef struct H264DecInput_
{
u8 *pStream; /* Pointer to the input */
u32 streamBusAddress; /* DMA bus address of the input stream */
u32 dataLen; /* Number of bytes to be decoded */
u32 picId; /* Identifier for the picture to be decoded */
} H264DecInput;
/* Output structure */
typedef struct H264DecOutput_
{
u8 *pStrmCurrPos; /* Pointer to stream position where decoding ended */
u32 strmCurrBusAddress; /* DMA bus address location where the decoding ended */
u32 dataLeft; /* how many bytes left undecoded */
} H264DecOutput;
/* cropping info */
typedef struct H264CropParams_
{
u32 cropLeftOffset;
u32 cropOutWidth;
u32 cropTopOffset;
u32 cropOutHeight;
} H264CropParams;
/* Output structure for H264DecNextPicture */
typedef struct H264DecPicture_
{
u32 picWidth; /* pixels width of the picture as stored in memory */
u32 picHeight; /* pixel height of the picture as stored in memory */
H264CropParams cropParams; /* cropping parameters */
const u32 *pOutputPicture; /* Pointer to the picture */
u32 outputPictureBusAddress; /* DMA bus address of the output picture buffer */
u32 picId; /* Identifier of the picture to be displayed */
u32 isIdrPicture; /* Indicates if picture is an IDR picture */
u32 nbrOfErrMBs; /* Number of concealed MB's in the picture */
u32 interlaced; /* non-zero for interlaced picture */
u32 fieldPicture; /* non-zero if interlaced and only one field present */
u32 topField; /* if only one field, non-zero signals TOP field otherwise BOTTOM */
} H264DecPicture;
/* stream info filled by H264DecGetInfo */
typedef struct H264DecInfo_
{
u32 picWidth; /* decoded picture width in pixels */
u32 picHeight; /* decoded picture height in pixels */
u32 videoRange; /* samples' video range */
u32 matrixCoefficients;
H264CropParams cropParams; /* display cropping information */
H264DecOutFormat outputFormat; /* format of the output picture */
u32 sarWidth; /* sample aspect ratio */
u32 sarHeight; /* sample aspect ratio */
u32 monoChrome; /* is sequence monochrome */
u32 interlacedSequence; /* is sequence interlaced */
u32 picBuffSize; /* number of picture buffers allocated&used by decoder */
u32 multiBuffPpSize; /* number of picture buffers needed in decoder+postprocessor multibuffer mode */
} H264DecInfo;
/* Version information */
typedef struct H264DecApiVersion_
{
u32 major; /* API major version */
u32 minor; /* API minor version */
} H264DecApiVersion;
typedef struct H264DecBuild_
{
u32 swBuild; /* Software build ID */
u32 hwBuild; /* Hardware build ID */
DecHwConfig hwConfig; /* hardware supported configuration */
} H264DecBuild;
/*------------------------------------------------------------------------------
Prototypes of Decoder API functions
------------------------------------------------------------------------------*/
H264DecApiVersion H264DecGetAPIVersion(void);
H264DecBuild H264DecGetBuild(void);
H264DecRet H264DecInit(H264DecInst * pDecInst, u32 noOutputReordering,
u32 useVideoFreezeConcealment,
u32 useDisplaySmoothing);
void H264DecRelease(H264DecInst decInst);
H264DecRet H264DecDecode(H264DecInst decInst,
const H264DecInput * pInput,
H264DecOutput * pOutput);
H264DecRet H264DecNextPicture(H264DecInst decInst,
H264DecPicture * pOutput, u32 endOfStream);
H264DecRet H264DecGetInfo(H264DecInst decInst, H264DecInfo * pDecInfo);
H264DecRet H264DecPeek(H264DecInst decInst, H264DecPicture * pOutput);
/*------------------------------------------------------------------------------
Prototype of the API trace funtion. Traces all API entries and returns.
This must be implemented by the application using the decoder API!
Argument:
string - trace message, a null terminated string
------------------------------------------------------------------------------*/
void H264DecTrace(const char *string);
#ifdef __cplusplus
}
#endif
#endif /* __H264DECAPI_H__ */

View File

@ -0,0 +1,51 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : API extension of H.264 Decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264decapi_e.h,v $
-- $Date: 2009/06/08 12:21:05 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef __H264DECAPI_E_H__
#define __H264DECAPI_E_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include "h264decapi.h"
/*------------------------------------------------------------------------------
Prototypes of Decoder API extension functions
------------------------------------------------------------------------------*/
H264DecRet H264DecNextChPicture(H264DecInst decInst,
u32 **pOutputPicture,
u32 *outputPictureBusAddress);
#ifdef __cplusplus
}
#endif
#endif /* __H264DECAPI_E_H__ */

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Hardware interface read/write
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_asic.h,v $
-- $Revision: 1.2 $
-- $Date: 2008/09/15 09:55:40 $
--
------------------------------------------------------------------------------*/
#ifndef __H264ASIC_H__
#define __H264ASIC_H__
#include "basetype.h"
#include "dwl.h"
#include "h264hwd_container.h"
#include "h264hwd_storage.h"
#define ASIC_MB_RLC_BUFFER_SIZE 880 /* bytes */
#define ASIC_MB_CTRL_BUFFER_SIZE 8 /* bytes */
#define ASIC_MB_MV_BUFFER_SIZE 64 /* bytes */
#define ASIC_MB_I4X4_BUFFER_SIZE 8 /* bytes */
#define ASIC_CABAC_INIT_BUFFER_SIZE 3680/* bytes */
#define ASIC_SCALING_LIST_SIZE 6*16+2*64
#define ASIC_POC_BUFFER_SIZE 34*4
#define X170_DEC_TIMEOUT 0x00FFU
#define X170_DEC_SYSTEM_ERROR 0x0FFFU
#define X170_DEC_HW_RESERVED 0xFFFFU
/* asic macroblock types */
typedef enum H264AsicMbTypes
{
HW_P_16x16 = 0,
HW_P_16x8 = 1,
HW_P_8x16 = 2,
HW_P_8x8 = 3,
HW_I_4x4 = 4,
HW_I_16x16 = 5,
HW_I_PCM = 6,
HW_P_SKIP = 7
} H264AsicMbTypes_t;
u32 AllocateAsicBuffers(decContainer_t * pDecCont,
DecAsicBuffers_t * asicBuff, u32 mbs);
void ReleaseAsicBuffers(const void *dwl, DecAsicBuffers_t * asicBuff);
void PrepareIntra4x4ModeData(storage_t * pStorage,
DecAsicBuffers_t * pAsicBuff);
void PrepareMvData(storage_t * pStorage, DecAsicBuffers_t * pAsicBuff);
void PrepareRlcCount(storage_t * pStorage, DecAsicBuffers_t * pAsicBuff);
void H264SetupVlcRegs(decContainer_t * pDecCont);
void H264InitRefPicList(decContainer_t *pDecCont);
u32 H264RunAsic(decContainer_t * pDecCont, DecAsicBuffers_t * pAsicBuff);
#endif /* __H264ASIC_H__ */

View File

@ -0,0 +1,67 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Extract a NAL unit from byte stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_byte_stream.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_BYTE_STREAM_H
#define H264HWD_BYTE_STREAM_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdExtractNalUnit(const u8 * pByteStream, u32 len,
strmData_t * pStrmData, u32 * readBytes, u32 rlcMode);
const u8 *h264bsdFindNextStartCode(const u8 * pByteStream, u32 len);
#endif /* #ifdef H264HWD_BYTE_STREAM_H */

View File

@ -0,0 +1,35 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : CABAC initialization tables.
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_cabac.h,v $
-- $Revision: 1.1 $
-- $Date: 2008/03/13 12:48:06 $
--
------------------------------------------------------------------------------*/
#ifndef __H264CABAC_H__
#define __H264CABAC_H__
#include "basetype.h"
extern const u32 cabacInitValues[4*460*2/4];
#endif /* __H264CABAC_H__ */

View File

@ -0,0 +1,53 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Context Adaptive Variable Lengtch Code (CAVLC) decoding
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_cavlc.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef H264HWD_CAVLC_H
#define H264HWD_CAVLC_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeResidualBlockCavlc(strmData_t * pStrmData,
u16 * coeffLevel, i32 nc, u32 maxNumCoeff);
#endif /* #ifdef H264HWD_CAVLC_H */

View File

@ -0,0 +1,66 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decoder configuration information
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_cfg.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_CFG_H
#define H264HWD_CFG_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#define MAX_NUM_REF_PICS 16
#define MAX_NUM_SLICE_GROUPS 8
#define MAX_NUM_SEQ_PARAM_SETS 32
#define MAX_NUM_PIC_PARAM_SETS 256
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
#endif /* #ifdef H264HWD_CFG_H */

View File

@ -0,0 +1,39 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Error concealment
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_conceal.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef __H264HWD_CONCEAL_H__
#define __H264HWD_CONCEAL_H__
#include "basetype.h"
#include "h264hwd_slice_header.h"
#include "h264hwd_storage.h"
#include "h264hwd_asic.h"
void h264bsdConceal(storage_t *pStorage, DecAsicBuffers_t * pAsicBuff,
u32 sliceType);
#endif /* __H264HWD_CONCEAL_H__ */

View File

@ -0,0 +1,130 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Definition of decContainer_t data structure
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_container.h,v $
-- $Date: 2009/04/27 08:56:17 $
-- $Revision: 1.10 $
--
------------------------------------------------------------------------------*/
#ifndef H264HWD_CONTAINER_H
#define H264HWD_CONTAINER_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_storage.h"
#include "h264hwd_util.h"
#include "refbuffer.h"
#include "deccfg.h"
#include "decppif.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
#define H264DEC_UNINITIALIZED 0U
#define H264DEC_INITIALIZED 1U
#define H264DEC_BUFFER_EMPTY 2U
#define H264DEC_NEW_HEADERS 3U
/* asic interface */
typedef struct DecAsicBuffers
{
u32 buff_status;
DWLLinearMem_t mbCtrl;
DWLLinearMem_t mv;
DWLLinearMem_t intraPred;
DWLLinearMem_t residual;
DWLLinearMem_t *outBuffer;
DWLLinearMem_t cabacInit;
u32 refPicList[16];
u32 maxRefFrm;
u32 filterDisable;
i32 chromaQpIndexOffset;
i32 chromaQpIndexOffset2;
u32 currentMB;
u32 notCodedMask;
u32 rlcWords;
u32 picSizeInMbs;
u32 wholePicConcealed;
u32 disableOutWriting;
u32 enableDmvAndPoc;
} DecAsicBuffers_t;
typedef struct decContainer
{
const void *checksum;
u32 decStat;
u32 picNumber;
u32 asicRunning;
u32 rlcMode;
u32 tryVlc;
u32 reallocate;
const u8 *pHwStreamStart;
u32 hwStreamStartBus;
u32 hwBitPos;
u32 hwLength;
u32 streamPosUpdated;
u32 nalStartCode;
u32 modeChange;
u32 gapsCheckedForThis;
u32 packetDecoded;
u32 forceRlcMode; /* by default stays 0, testing can set it to 1 for RLC mode */
u32 h264Regs[DEC_X170_REGISTERS];
storage_t storage; /* h264bsd storage */
DecAsicBuffers_t asicBuff[1];
const void *dwl; /* DWL instance */
u32 refBufSupport;
u32 h264ProfileSupport;
u32 is8190;
u32 maxDecPicWidth;
refBuffer_t refBufferCtrl;
u32 keepHwReserved;
struct pp_
{
const void *ppInstance;
void (*PPDecStart) (const void *, const DecPpInterface *);
void (*PPDecWaitEnd) (const void *);
void (*PPConfigQuery) (const void *, DecPpQuery *);
void (*PPNextDisplayId)(const void *, u32); /* set the next PP outpic ID (multibuffer) */
DecPpInterface decPpIf;
DecPpQuery ppInfo;
const DWLLinearMem_t * sentPicToPp[17]; /* list of pictures sent to pp */
const DWLLinearMem_t * queuedPicToPp; /* queued picture that should be processed next */
u32 multiMaxId; /* maximum position used in sentPicToPp[] */
} pp;
} decContainer_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
#endif /* #ifdef H264HWD_CONTAINER_H */

View File

@ -0,0 +1,85 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Utility macros for debugging and tracing
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_debug.h,v $
-- $Date: 2008/03/13 12:47:14 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef __H264DEBUG_H__
#define __H264DEBUG_H__
/* macro for assertion, used only when _ASSERT_USED is defined */
#ifdef _ASSERT_USED
#ifndef ASSERT
#include <assert.h>
#define ASSERT(expr) assert(expr)
#endif
#else
#define ASSERT(expr)
#endif
/* macros for range checking used only when _RANGE_CHECK is defined */
#ifdef _RANGE_CHECK
#include <stdio.h>
/* macro for range checking an single value */
#define RANGE_CHECK(value, minBound, maxBound) \
{ \
if ((value) < (minBound) || (value) > (maxBound)) \
fprintf(stderr, "Warning: Value exceeds given limit(s)!\n"); \
}
/* macro for range checking an array of values */
#define RANGE_CHECK_ARRAY(array, minBound, maxBound, length) \
{ \
i32 i; \
for (i = 0; i < (length); i++) \
if ((array)[i] < (minBound) || (array)[i] > (maxBound)) \
fprintf(stderr,"Warning: Value [%d] exceeds given limit(s)!\n",i); \
}
#else /* _RANGE_CHECK */
#define RANGE_CHECK_ARRAY(array, minBound, maxBound, length)
#define RANGE_CHECK(value, minBound, maxBound)
#endif /* _RANGE_CHECK */
/* macro for debug printing, used only when _DEBUG_PRINT is defined */
#ifdef _DEBUG_PRINT
#include <stdio.h>
#define DEBUG_PRINT(args) printf args
#else
#define DEBUG_PRINT(args)
#endif
/* macro for error printing, used only when _ERROR_PRINT is defined */
#ifdef _ERROR_PRINT
#include <stdio.h>
#define ERROR_PRINT(msg) fprintf(stderr,"ERROR: %s\n",msg)
#else
#define ERROR_PRINT(msg)
#endif
#endif /* __H264DEBUG_H__ */

View File

@ -0,0 +1,88 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Top level control of the decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_decoder.h,v $
-- $Date: 2009/11/26 13:32:15 $
-- $Revision: 1.4 $
--
------------------------------------------------------------------------------*/
#ifndef H264HWD_DECODER_H
#define H264HWD_DECODER_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_storage.h"
#include "h264hwd_container.h"
#include "h264hwd_dpb.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/* enumerated return values of the functions */
enum
{
H264BSD_RDY,
H264BSD_PIC_RDY,
H264BSD_HDRS_RDY,
H264BSD_ERROR,
H264BSD_PARAM_SET_ERROR,
H264BSD_NEW_ACCESS_UNIT,
H264BSD_FMO,
H264BSD_UNPAIRED_FIELD
};
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void h264bsdInit(storage_t * pStorage, u32 noOutputReordering,
u32 useSmoothingBuffer);
u32 h264bsdDecode(decContainer_t * pDecCont, const u8 * byteStrm, u32 len,
u32 picId, u32 * readBytes);
void h264bsdShutdown(storage_t * pStorage);
const dpbOutPicture_t *h264bsdNextOutputPicture(storage_t * pStorage);
u32 h264bsdPicWidth(storage_t * pStorage);
u32 h264bsdPicHeight(storage_t * pStorage);
u32 h264bsdVideoRange(storage_t * pStorage);
u32 h264bsdMatrixCoefficients(storage_t * pStorage);
u32 h264bsdIsMonoChrome(storage_t * pStorage);
void h264bsdCroppingParams(storage_t * pStorage, u32 * croppingFlag,
u32 * left, u32 * width, u32 * top, u32 * height);
u32 h264bsdCheckValidParamSets(storage_t * pStorage);
void h264bsdFlushBuffer(storage_t * pStorage);
u32 h264bsdAspectRatioIdc(const storage_t * pStorage);
void h264bsdSarSize(const storage_t * pStorage, u32 * sar_width,
u32 * sar_height);
#endif /* #ifdef H264HWD_DECODER_H */

View File

@ -0,0 +1,185 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decoded Picture Buffer (DPB) handling
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_dpb.h,v $
-- $Date: 2010/01/12 07:06:02 $
-- $Revision: 1.11 $
--
------------------------------------------------------------------------------*/
#ifndef H264HWD_DPB_H
#define H264HWD_DPB_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_slice_header.h"
#include "h264hwd_image.h"
#include "dwl.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* enumeration to represent status of buffered image */
typedef enum
{
UNUSED = 0,
NON_EXISTING,
SHORT_TERM,
LONG_TERM,
EMPTY
} dpbPictureStatus_e;
/* structure to represent a buffered picture */
typedef struct dpbPicture
{
u32 memIdx;
DWLLinearMem_t *data;
i32 picNum;
u32 frameNum;
i32 picOrderCnt[2];
dpbPictureStatus_e status[2];
u32 toBeDisplayed;
u32 picId;
u32 numErrMbs;
u32 isIdr;
u32 isFieldPic;
} dpbPicture_t;
/* structure to represent display image output from the buffer */
typedef struct
{
u32 memIdx;
DWLLinearMem_t *data;
u32 picId;
u32 numErrMbs;
u32 isIdr;
u32 interlaced;
u32 fieldPicture;
u32 topField;
} dpbOutPicture_t;
/* structure to represent DPB */
typedef struct dpbStorage
{
dpbPicture_t buffer[16 + 1];
u32 list[16 + 1];
dpbPicture_t *currentOut;
u32 currentOutPos;
dpbOutPicture_t *outBuf;
u32 numOut;
u32 outIndexW;
u32 outIndexR;
u32 maxRefFrames;
u32 dpbSize;
u32 maxFrameNum;
u32 maxLongTermFrameIdx;
u32 numRefFrames;
u32 fullness;
u32 prevRefFrameNum;
u32 lastContainsMmco5;
u32 noReordering;
u32 flushed;
u32 picSizeInMbs;
u32 dirMvOffset;
DWLLinearMem_t poc;
u32 delayedOut;
u32 delayedId;
u32 interlaced;
u32 ch2Offset;
u32 numFreeBuffers;
u32 freeBuffers[16+1];
u32 memStat[16+1+16+1];
u32 totBuffers;
DWLLinearMem_t picBuffers[16+1+16+1];
/* flag to prevent output when display smoothing is used and second field
* of a picture was just decoded */
u32 noOutput;
u32 prevOutIdx;
} dpbStorage_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdInitDpb(const void *dwl,
dpbStorage_t * dpb,
u32 picSizeInMbs,
u32 dpbSize,
u32 numRefFrames, u32 maxFrameNum, u32 noReordering,
u32 displaySmoothing,
u32 monoChrome, u32 isHighSupported, u32 enable2ndChroma);
u32 h264bsdResetDpb(const void *dwl,
dpbStorage_t * dpb,
u32 picSizeInMbs,
u32 dpbSize,
u32 numRefFrames, u32 maxFrameNum, u32 noReordering,
u32 displaySmoothing,
u32 monoChrome, u32 isHighSupported, u32 enable2ndChroma);
void h264bsdInitRefPicList(dpbStorage_t * dpb);
void *h264bsdAllocateDpbImage(dpbStorage_t * dpb);
i32 h264bsdGetRefPicData(const dpbStorage_t * dpb, u32 index);
u8 *h264bsdGetRefPicDataVlcMode(const dpbStorage_t * dpb, u32 index,
u32 fieldMode);
u32 h264bsdReorderRefPicList(dpbStorage_t * dpb,
refPicListReordering_t * order,
u32 currFrameNum, u32 numRefIdxActive);
u32 h264bsdMarkDecRefPic(dpbStorage_t * dpb,
/*@null@ */ const decRefPicMarking_t * mark,
const image_t * image, u32 frameNum, i32 *picOrderCnt,
u32 isIdr, u32 picId, u32 numErrMbs);
u32 h264bsdCheckGapsInFrameNum(dpbStorage_t * dpb, u32 frameNum, u32 isRefPic,
u32 gapsAllowed);
/*@null@*/ dpbOutPicture_t *h264bsdDpbOutputPicture(dpbStorage_t * dpb);
void h264bsdFlushDpb(dpbStorage_t * dpb);
void h264bsdFreeDpb(const void *dwl, dpbStorage_t * dpb);
void ShellSort(dpbStorage_t * dpb, u32 *list, u32 type, i32 par);
void ShellSortF(dpbStorage_t * dpb, u32 *list, u32 type, /*u32 parity,*/ i32 par);
void SetPicNums(dpbStorage_t * dpb, u32 currFrameNum);
void h264DpbUpdateOutputList(dpbStorage_t * dpb, const image_t * image);
#endif /* #ifdef H264HWD_DPB_H */

View File

@ -0,0 +1,45 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Macroblock level stream decoding and macroblock reconstruction
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_exports.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef __H264HWD_EXPORTS_H__
#define __H264HWD_EXPORTS_H__
#include "h264hwd_asic.h"
#include "h264hwd_storage.h"
u32 h264bsdDecodeMacroblock(storage_t * pStorage, u32 mbNum, i32 * qpY,
DecAsicBuffers_t * pAsicBuff);
u32 PrepareIntraPrediction(mbStorage_t * pMb, macroblockLayer_t * mbLayer,
u32 constrainedIntraPred,
DecAsicBuffers_t * pAsicBuff);
u32 PrepareInterPrediction(mbStorage_t * pMb, macroblockLayer_t * pMbLayer,
dpbStorage_t * dpb, DecAsicBuffers_t * pAsicBuff);
#endif /* __H264HWD_EXPORTS_H__ */

View File

@ -0,0 +1,66 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Write macroblock data into the picture
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_image.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_IMAGE_H
#define H264HWD_IMAGE_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "dwl.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
DWLLinearMem_t *data;
u32 width;
u32 height;
u32 picStruct;
} image_t;
#endif /* #ifdef H264HWD_IMAGE_H */

View File

@ -0,0 +1,208 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Macroblock level stream decoding and macroblock reconstruction
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_macroblock_layer.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef H264HWD_MACROBLOCK_LAYER_H
#define H264HWD_MACROBLOCK_LAYER_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
#include "h264hwd_slice_header.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/* Macro to determine if a mb is an intra mb */
#define IS_INTRA_MB(a) ((a).mbType > 5)
/* Macro to determine if a mb is an I_PCM mb */
#define IS_I_PCM_MB(a) ((a).mbType == 31)
typedef enum mbType
{
P_Skip = 0,
P_L0_16x16 = 1,
P_L0_L0_16x8 = 2,
P_L0_L0_8x16 = 3,
P_8x8 = 4,
P_8x8ref0 = 5,
I_4x4 = 6,
I_16x16_0_0_0 = 7,
I_16x16_1_0_0 = 8,
I_16x16_2_0_0 = 9,
I_16x16_3_0_0 = 10,
I_16x16_0_1_0 = 11,
I_16x16_1_1_0 = 12,
I_16x16_2_1_0 = 13,
I_16x16_3_1_0 = 14,
I_16x16_0_2_0 = 15,
I_16x16_1_2_0 = 16,
I_16x16_2_2_0 = 17,
I_16x16_3_2_0 = 18,
I_16x16_0_0_1 = 19,
I_16x16_1_0_1 = 20,
I_16x16_2_0_1 = 21,
I_16x16_3_0_1 = 22,
I_16x16_0_1_1 = 23,
I_16x16_1_1_1 = 24,
I_16x16_2_1_1 = 25,
I_16x16_3_1_1 = 26,
I_16x16_0_2_1 = 27,
I_16x16_1_2_1 = 28,
I_16x16_2_2_1 = 29,
I_16x16_3_2_1 = 30,
I_PCM = 31
} mbType_e;
typedef enum subMbType
{
P_L0_8x8 = 0,
P_L0_8x4 = 1,
P_L0_4x8 = 2,
P_L0_4x4 = 3
} subMbType_e;
typedef enum mbPartMode
{
MB_P_16x16 = 0,
MB_P_16x8,
MB_P_8x16,
MB_P_8x8
} mbPartMode_e;
typedef enum subMbPartMode
{
MB_SP_8x8 = 0,
MB_SP_8x4,
MB_SP_4x8,
MB_SP_4x4
} subMbPartMode_e;
typedef enum mbPartPredMode
{
PRED_MODE_INTRA4x4 = 0,
PRED_MODE_INTRA16x16,
PRED_MODE_INTER
} mbPartPredMode_e;
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct mv
{
i16 hor;
i16 ver;
} mv_t;
typedef struct mbPred
{
u32 prevIntra4x4PredModeFlag[16];
u32 remIntra4x4PredMode[16];
u32 intraChromaPredMode;
} mbPred_t;
typedef struct subMbPred
{
subMbType_e subMbType[4];
} subMbPred_t;
typedef struct
{
u16 rlc[468];
u8 totalCoeff[28];
} residual_t;
typedef struct macroblockLayer
{
/*u32 disableDeblockingFilterIdc; */
i32 filterOffsetA;
i32 filterOffsetB;
u32 disableDeblockingFilterIdc;
mbType_e mbType;
u32 codedBlockPattern;
i32 mbQpDelta;
mbPred_t mbPred;
subMbPred_t subMbPred;
residual_t residual;
} macroblockLayer_t;
typedef struct mbStorage
{
mbType_e mbType;
mbType_e mbType_asic;
u32 sliceId;
/*u32 disableDeblockingFilterIdc; */
/*i32 filterOffsetA; */
/*i32 filterOffsetB; */
u32 qpY;
/*i32 chromaQpIndexOffset; */
u8 totalCoeff[24];
u8 intra4x4PredMode[16];
u8 intra4x4PredMode_asic[16];
/* u32 refPic[4]; */
u8 refIdxL0[4];
u8 refID[4];
mv_t mv[16];
u32 decoded;
struct mbStorage *mbA;
struct mbStorage *mbB;
struct mbStorage *mbC;
struct mbStorage *mbD;
} mbStorage_t;
struct cabac_s;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeMacroblockLayerCavlc(strmData_t * pStrmData,
macroblockLayer_t * pMbLayer,
mbStorage_t * pMb,
const sliceHeader_t * pSliceHdr );
u32 h264bsdDecodeMacroblockLayerCabac(strmData_t * pStrmData,
macroblockLayer_t * pMbLayer,
mbStorage_t * pMb,
const sliceHeader_t * pSliceHdr,
struct cabac_s * pCabac );
u32 h264bsdNumSubMbPart(subMbType_e subMbType);
subMbPartMode_e h264bsdSubMbPartMode(subMbType_e subMbType);
u32 h264bsdPredModeIntra16x16(mbType_e mbType);
mbPartPredMode_e h264bsdMbPartPredMode(mbType_e mbType);
#endif /* #ifdef H264HWD_MACROBLOCK_LAYER_H */

View File

@ -0,0 +1,93 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode NAL unit header
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_nal_unit.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_NAL_UNIT_H
#define H264HWD_NAL_UNIT_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/* macro to determine if NAL unit pointed by pNalUnit contains an IDR slice */
#define IS_IDR_NAL_UNIT(pNalUnit) \
((pNalUnit)->nalUnitType == NAL_CODED_SLICE_IDR)
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef enum
{
NAL_UNSPECIFIED = 0,
NAL_CODED_SLICE = 1,
NAL_CODED_SLICE_DP_A = 2,
NAL_CODED_SLICE_DP_B = 3,
NAL_CODED_SLICE_DP_C = 4,
NAL_CODED_SLICE_IDR = 5,
NAL_SEI = 6,
NAL_SEQ_PARAM_SET = 7,
NAL_PIC_PARAM_SET = 8,
NAL_ACCESS_UNIT_DELIMITER = 9,
NAL_END_OF_SEQUENCE = 10,
NAL_END_OF_STREAM = 11,
NAL_FILLER_DATA = 12,
NAL_SPS_EXT = 13,
NAL_CODED_SLICE_AUX = 19,
NAL_MAX_TYPE_VALUE = 31
} nalUnitType_e;
typedef struct
{
nalUnitType_e nalUnitType;
u32 nalRefIdc;
} nalUnit_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeNalUnit(strmData_t * pStrmData, nalUnit_t * pNalUnit);
#endif /* #ifdef H264HWD_NAL_UNIT_H */

View File

@ -0,0 +1,91 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Get neighbour blocks
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_neighbour.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_NEIGHBOUR_H
#define H264HWD_NEIGHBOUR_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_macroblock_layer.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
typedef enum {
MB_A = 0,
MB_B,
MB_C,
MB_D,
MB_CURR,
MB_NA = 0xFF
} neighbourMb_e;
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
neighbourMb_e mb;
u8 index;
} neighbour_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void h264bsdInitMbNeighbours(mbStorage_t *pMbStorage, u32 picWidth,
u32 picSizeInMbs);
/*@null@*/ mbStorage_t* h264bsdGetNeighbourMb(mbStorage_t *pMb,
neighbourMb_e neighbour);
u32 h264bsdIsNeighbourAvailable(mbStorage_t *pMb,
/*@null@*/ mbStorage_t *pNeighbour);
const neighbour_t* h264bsdNeighbour4x4BlockA(u32 blockIndex);
const neighbour_t* h264bsdNeighbour4x4BlockB(u32 blockIndex);
const neighbour_t* h264bsdNeighbour4x4BlockC(u32 blockIndex);
const neighbour_t* h264bsdNeighbour4x4BlockD(u32 blockIndex);
#endif /* #ifdef H264HWD_NEIGHBOUR_H */

View File

@ -0,0 +1,80 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Compute Picture Order Count (POC) for a picture
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_pic_order_cnt.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_PIC_ORDER_CNT_H
#define H264HWD_PIC_ORDER_CNT_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_seq_param_set.h"
#include "h264hwd_slice_header.h"
#include "h264hwd_nal_unit.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* structure to store information computed for previous picture, needed for
* POC computation of a picture. Two first fields for POC type 0, last two
* for types 1 and 2 */
typedef struct
{
u32 prevPicOrderCntLsb;
i32 prevPicOrderCntMsb;
u32 prevFrameNum;
u32 prevFrameNumOffset;
u32 containsMmco5;
i32 picOrderCnt[2];
} pocStorage_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void h264bsdDecodePicOrderCnt(pocStorage_t *poc, const seqParamSet_t *sps,
const sliceHeader_t *sliceHeader, const nalUnit_t *pNalUnit);
#endif /* #ifdef H264HWD_PIC_ORDER_CNT_H */

View File

@ -0,0 +1,98 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode picture parameter set information from the stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_pic_param_set.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_PIC_PARAM_SET_H
#define H264HWD_PIC_PARAM_SET_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* data structure to store PPS information decoded from the stream */
typedef struct
{
u32 picParameterSetId;
u32 seqParameterSetId;
u32 picOrderPresentFlag;
u32 numSliceGroups;
u32 sliceGroupMapType;
u32 *runLength;
u32 *topLeft;
u32 *bottomRight;
u32 sliceGroupChangeDirectionFlag;
u32 sliceGroupChangeRate;
u32 picSizeInMapUnits;
u32 *sliceGroupId;
u32 numRefIdxL0Active;
u32 numRefIdxL1Active;
u32 picInitQp;
i32 chromaQpIndexOffset;
i32 chromaQpIndexOffset2;
u32 deblockingFilterControlPresentFlag;
u32 constrainedIntraPredFlag;
u32 redundantPicCntPresentFlag;
u32 entropyCodingModeFlag;
u32 weightedPredFlag;
u32 weightedBiPredIdc;
u32 transform8x8Flag;
u32 scalingMatrixPresentFlag;
u32 scalingListPresent[8];
u32 useDefaultScaling[8];
u8 scalingList[8][64];
} picParamSet_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodePicParamSet(strmData_t *pStrmData,
picParamSet_t *pPicParamSet);
#endif /* #ifdef H264HWD_PIC_PARAM_SET_H */

View File

@ -0,0 +1,44 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Hardware interface read/write
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_regdrv.h,v $
-- $Revision: 1.1 $
-- $Date: 2008/03/13 12:48:06 $
--
------------------------------------------------------------------------------*/
#ifndef __H264HWD_REGDRV_H__
#define __H264HWD_REGDRV_H__
#include "basetype.h"
#include "regdrv.h"
#define DEC_X170_ALIGN_MASK 0x07
#define DEC_X170_MODE_H264 0x00
#define DEC_X170_IRQ_DEC_RDY 0x01
#define DEC_X170_IRQ_BUS_ERROR 0x02
#define DEC_X170_IRQ_BUFFER_EMPTY 0x04
#define DEC_X170_IRQ_ASO 0x08
#define DEC_X170_IRQ_STREAM_ERROR 0x10
#define DEC_X170_IRQ_TIMEOUT 0x40
#endif /* __H264HWD_REGDRV_H__ */

View File

@ -0,0 +1,110 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode seq parameter set information from the stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_seq_param_set.h,v $
-- $Date: 2008/07/31 08:51:30 $
-- $Revision: 1.2 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_SEQ_PARAM_SET_H
#define H264HWD_SEQ_PARAM_SET_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
#include "h264hwd_vui.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* structure to store sequence parameter set information decoded from the
* stream */
typedef struct
{
u32 profileIdc;
u32 levelIdc;
u8 constrained_set0_flag;
u8 constrained_set1_flag;
u8 constrained_set2_flag;
u8 constrained_set3_flag;
u32 seqParameterSetId;
u32 maxFrameNum;
u32 picOrderCntType;
u32 maxPicOrderCntLsb;
u32 deltaPicOrderAlwaysZeroFlag;
i32 offsetForNonRefPic;
i32 offsetForTopToBottomField;
u32 numRefFramesInPicOrderCntCycle;
i32 *offsetForRefFrame;
u32 numRefFrames;
u32 gapsInFrameNumValueAllowedFlag;
u32 picWidthInMbs;
u32 picHeightInMbs;
u32 frameCroppingFlag;
u32 frameCropLeftOffset;
u32 frameCropRightOffset;
u32 frameCropTopOffset;
u32 frameCropBottomOffset;
u32 vuiParametersPresentFlag;
vuiParameters_t *vuiParameters;
u32 maxDpbSize;
u32 frameMbsOnlyFlag;
u32 mbAdaptiveFrameFieldFlag;
u32 direct8x8InferenceFlag;
u32 chromaFormatIdc;
u32 monoChrome;
u32 scalingMatrixPresentFlag;
u32 scalingListPresent[8];
u32 useDefaultScaling[8];
u8 scalingList[8][64];
} seqParamSet_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeSeqParamSet(strmData_t *pStrmData,
seqParamSet_t *pSeqParamSet);
u32 h264bsdCompareSeqParamSets(seqParamSet_t *pSps1, seqParamSet_t *pSps2);
#endif /* #ifdef H264HWD_SEQ_PARAM_SET_H */

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode slice data, i.e. macroblocks of a slice, from the stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_slice_data.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_SLICE_DATA_H
#define H264HWD_SLICE_DATA_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "h264hwd_container.h"
#include "basetype.h"
#include "h264hwd_stream.h"
#include "h264hwd_cfg.h"
#include "h264hwd_slice_header.h"
#include "h264hwd_storage.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeSliceData( decContainer_t * pDecCont, strmData_t *pStrmData,
sliceHeader_t *pSliceHeader);
void h264bsdMarkSliceCorrupted(storage_t *pStorage, u32 firstMbInSlice);
#endif /* #ifdef H264HWD_SLICE_DATA_H */

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Compute macroblock to slice group map
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_slice_group_map.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_SLICE_GROUP_MAP_H
#define H264HWD_SLICE_GROUP_MAP_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_pic_param_set.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void h264bsdDecodeSliceGroupMap(
u32 *map,
picParamSet_t *pps,
u32 sliceGroupChangeCycle,
u32 picWidth,
u32 picHeight);
#endif /* #ifdef H264HWD_SLICE_GROUP_MAP_H */

View File

@ -0,0 +1,243 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode slice header information from the stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_slice_header.h,v $
-- $Date: 2009/09/16 11:33:06 $
-- $Revision: 1.3 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_SLICE_HEADER_H
#define H264HWD_SLICE_HEADER_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
#include "h264hwd_cfg.h"
#include "h264hwd_seq_param_set.h"
#include "h264hwd_pic_param_set.h"
#include "h264hwd_nal_unit.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
enum {
P_SLICE = 0,
B_SLICE = 1,
I_SLICE = 2
};
enum {NO_LONG_TERM_FRAME_INDICES = 0xFFFF};
/* macro to determine if slice is an inter slice, sliceTypes 0 and 5 */
#define IS_P_SLICE(sliceType) (((sliceType) == P_SLICE) || \
((sliceType) == P_SLICE + 5))
/* macro to determine if slice is an intra slice, sliceTypes 2 and 7 */
#define IS_I_SLICE(sliceType) (((sliceType) == I_SLICE) || \
((sliceType) == I_SLICE + 5))
#define IS_B_SLICE(sliceType) (((sliceType) == B_SLICE) || \
((sliceType) == B_SLICE + 5))
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* structure to store data of one reference picture list reordering operation */
typedef struct
{
u32 reorderingOfPicNumsIdc;
u32 absDiffPicNum;
u32 longTermPicNum;
} refPicListReorderingOperation_t;
/* structure to store reference picture list reordering operations */
typedef struct
{
u32 refPicListReorderingFlagL0;
refPicListReorderingOperation_t command[MAX_NUM_REF_PICS+1];
} refPicListReordering_t;
/* structure to store data of one DPB memory management control operation */
typedef struct
{
u32 memoryManagementControlOperation;
u32 differenceOfPicNums;
u32 longTermPicNum;
u32 longTermFrameIdx;
u32 maxLongTermFrameIdx;
} memoryManagementOperation_t;
/* worst case scenario: all MAX_NUM_REF_PICS pictures in the buffer are
* short term pictures, each one of them is first marked as long term
* reference picture which is then marked as unused for reference.
* Additionally, max long-term frame index is set and current picture is
* marked as long term reference picture. Last position reserved for
* end memory_management_control_operation command */
#define MAX_NUM_MMC_OPERATIONS (2*MAX_NUM_REF_PICS+2+1)
/* structure to store decoded reference picture marking data */
typedef struct
{
u32 strmLen;
u32 noOutputOfPriorPicsFlag;
u32 longTermReferenceFlag;
u32 adaptiveRefPicMarkingModeFlag;
memoryManagementOperation_t operation[MAX_NUM_MMC_OPERATIONS];
} decRefPicMarking_t;
/* structure to store slice header data decoded from the stream */
typedef struct
{
u32 firstMbInSlice;
u32 sliceType;
u32 picParameterSetId;
u32 frameNum;
u32 idrPicId;
u32 pocLength;
u32 pocLengthHw;
u32 picOrderCntLsb;
i32 deltaPicOrderCntBottom;
i32 deltaPicOrderCnt[2];
u32 redundantPicCnt;
u32 numRefIdxActiveOverrideFlag;
u32 numRefIdxL0Active;
u32 numRefIdxL1Active;
i32 sliceQpDelta;
u32 disableDeblockingFilterIdc;
i32 sliceAlphaC0Offset;
i32 sliceBetaOffset;
u32 sliceGroupChangeCycle;
refPicListReordering_t refPicListReordering;
refPicListReordering_t refPicListReorderingL1;
decRefPicMarking_t decRefPicMarking;
u32 cabacInitIdc;
u32 fieldPicFlag;
u32 bottomFieldFlag;
u32 directSpatialMvPredFlag;
} sliceHeader_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeSliceHeader(strmData_t *pStrmData,
sliceHeader_t *pSliceHeader,
seqParamSet_t *pSeqParamSet,
picParamSet_t *pPicParamSet,
nalUnit_t *pNalUnit);
u32 h264bsdCheckPpsId(strmData_t *pStrmData, u32 *ppsId);
u32 h264bsdCheckFrameNum(
strmData_t *pStrmData,
u32 maxFrameNum,
u32 *frameNum);
u32 h264bsdCheckIdrPicId(
strmData_t *pStrmData,
u32 maxFrameNum,
nalUnitType_e nalUnitType,
u32 fieldPicFlag,
u32 *idrPicId);
u32 h264bsdCheckPicOrderCntLsb(
strmData_t *pStrmData,
seqParamSet_t *pSeqParamSet,
nalUnitType_e nalUnitType,
u32 *picOrderCntLsb);
u32 h264bsdCheckDeltaPicOrderCntBottom(
strmData_t *pStrmData,
seqParamSet_t *pSeqParamSet,
nalUnitType_e nalUnitType,
i32 *deltaPicOrderCntBottom);
u32 h264bsdCheckDeltaPicOrderCnt(
strmData_t *pStrmData,
seqParamSet_t *pSeqParamSet,
nalUnitType_e nalUnitType,
u32 picOrderPresentFlag,
i32 *deltaPicOrderCnt);
u32 h264bsdCheckRedundantPicCnt(
const strmData_t *pStrmData,
const seqParamSet_t *pSeqParamSet,
const picParamSet_t *pPicParamSet,
nalUnitType_e nalUnitType,
u32 *redundantPicCnt);
u32 h264bsdCheckPriorPicsFlag(u32 * noOutputOfPriorPicsFlag,
const strmData_t * pStrmData,
const seqParamSet_t * pSeqParamSet,
const picParamSet_t * pPicParamSet,
nalUnitType_e nalUnitType);
u32 h264bsdFieldPicFlag(strmData_t * pStrmData,
u32 maxFrameNum,
nalUnitType_e nalUnitType,
u32 fieldPicFlagPresent,
u32 *fieldPicFlag);
u32 h264bsdBottomFieldFlag(strmData_t * pStrmData,
u32 maxFrameNum,
nalUnitType_e nalUnitType,
u32 fieldPicFlag,
u32 *bottomFieldFlag);
u32 h264bsdIsOppositeFieldPic(sliceHeader_t * pSliceCurr,
sliceHeader_t * pSlicePrev,
u32 *secondField, u32 prevRefFrameNum,
u32 newPicture);
u32 h264bsdCheckFieldPicFlag(strmData_t * pStrmData,
u32 maxFrameNum,
nalUnitType_e nalUnitType,
u32 fieldPicFlagPresent,
u32 *fieldPicFlag);
u32 h264bsdCheckBottomFieldFlag(strmData_t * pStrmData,
u32 maxFrameNum,
nalUnitType_e nalUnitType, u32 fieldPicFlag,
u32 * bottomFieldFlag);
u32 h264bsdCheckFirstMbInSlice(strmData_t * pStrmData,
nalUnitType_e nalUnitType,
u32 * firstMbInSlice);
#endif /* #ifdef H264HWD_SLICE_HEADER_H */

View File

@ -0,0 +1,204 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Storage handling functionality
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_storage.h,v $
-- $Date: 2010/02/15 06:59:52 $
-- $Revision: 1.10 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_STORAGE_H
#define H264HWD_STORAGE_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_cfg.h"
#include "h264hwd_seq_param_set.h"
#include "h264hwd_pic_param_set.h"
#include "h264hwd_macroblock_layer.h"
#include "h264hwd_nal_unit.h"
#include "h264hwd_slice_header.h"
#include "h264hwd_seq_param_set.h"
#include "h264hwd_dpb.h"
#include "h264hwd_pic_order_cnt.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
u32 sliceId;
u32 numDecodedMbs;
u32 lastMbAddr;
} sliceStorage_t;
/* structure to store parameters needed for access unit boundary checking */
typedef struct
{
nalUnit_t nuPrev[1];
u32 prevFrameNum;
u32 prevIdrPicId;
u32 prevPicOrderCntLsb;
i32 prevDeltaPicOrderCntBottom;
i32 prevDeltaPicOrderCnt[2];
u32 prevFieldPicFlag;
u32 prevBottomFieldFlag;
u32 firstCallFlag;
u32 newPicture;
} aubCheck_t;
/* storage data structure, holds all data of a decoder instance */
typedef struct
{
/* active paramet set ids and pointers */
u32 oldSpsId;
u32 activePpsId;
u32 activeSpsId;
picParamSet_t *activePps;
seqParamSet_t *activeSps;
seqParamSet_t *sps[MAX_NUM_SEQ_PARAM_SETS];
picParamSet_t *pps[MAX_NUM_PIC_PARAM_SETS];
/* current slice group map, recomputed for each slice */
u32 *sliceGroupMap;
u32 picSizeInMbs;
/* this flag is set after all macroblocks of a picture successfully
* decoded -> redundant slices not decoded */
u32 skipRedundantSlices;
u32 picStarted;
/* flag to indicate if current access unit contains any valid slices */
u32 validSliceInAccessUnit;
/* store information needed for handling of slice decoding */
sliceStorage_t slice[1];
/* number of concealed macroblocks in the current image */
u32 numConcealedMbs;
/* picId given by application */
u32 currentPicId;
/* macroblock specific storages, size determined by image dimensions */
mbStorage_t *mb;
/* flag to store noOutputReordering flag set by the application */
u32 noReordering;
/* DPB */
dpbStorage_t dpb[2];
/* structure to store picture order count related information */
pocStorage_t poc[2];
/* access unit boundary checking related data */
aubCheck_t aub[1];
/* current processed image */
image_t currImage[1];
/* last valid NAL unit header is stored here */
nalUnit_t prevNalUnit[1];
/* slice header, second structure used as a temporary storage while
* decoding slice header, first one stores last successfully decoded
* slice header */
sliceHeader_t sliceHeader[2];
/* fields to store old stream buffer pointers, needed when only part of
* a stream buffer is processed by h264bsdDecode function */
u32 prevBufNotFinished;
const u8 *prevBufPointer;
u32 prevBytesConsumed;
strmData_t strm[1];
/* macroblock layer structure, there is no need to store this but it
* would have increased the stack size excessively and needed to be
* allocated from heap -> easiest to put it here */
macroblockLayer_t mbLayer[1];
u32 asoDetected;
u32 secondField;
u32 checkedAub; /* signal that AUB was checked already */
u32 prevIdrPicReady; /* for FFWD workaround */
u32 intraFreeze;
u32 pictureBroken;
u32 enable2ndChroma; /* by default set according to ENABLE_2ND_CHROMA
compiler flag, may be overridden by testbench */
/* pointers to 2nd chroma output, only available if extension enabled */
u32 *pCh2;
u32 bCh2;
u32 ppUsed;
u32 useSmoothing;
u32 currentMarked;
} storage_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void h264bsdInitStorage(storage_t * pStorage);
void h264bsdResetStorage(storage_t * pStorage);
u32 h264bsdIsStartOfPicture(storage_t * pStorage);
u32 h264bsdIsEndOfPicture(storage_t * pStorage);
u32 h264bsdStoreSeqParamSet(storage_t * pStorage, seqParamSet_t * pSeqParamSet);
u32 h264bsdStorePicParamSet(storage_t * pStorage, picParamSet_t * pPicParamSet);
u32 h264bsdActivateParamSets(storage_t * pStorage, u32 ppsId, u32 isIdr);
void h264bsdComputeSliceGroupMap(storage_t * pStorage,
u32 sliceGroupChangeCycle);
u32 h264bsdCheckAccessUnitBoundary(strmData_t * strm,
nalUnit_t * nuNext,
storage_t * storage,
u32 * accessUnitBoundaryFlag);
u32 h264bsdValidParamSets(storage_t * pStorage);
u32 h264bsdAllocateSwResources(const void *dwl, storage_t * pStorage,
u32 isHighSupported);
#endif /* #ifdef H264HWD_STORAGE_H */

View File

@ -0,0 +1,79 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Stream buffer handling
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_stream.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_STREAM_H
#define H264HWD_STREAM_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
const u8 *pStrmBuffStart; /* pointer to start of stream buffer */
const u8 *pStrmCurrPos; /* current read address in stream buffer */
u32 bitPosInWord; /* bit position in stream buffer byte */
u32 strmBuffSize; /* size of stream buffer (bytes) */
u32 strmBuffReadBits; /* number of bits read from stream buffer */
u32 removeEmul3Byte; /* signal the pre-removal of emulation prevention 3 bytes */
u32 emulByteCount; /* counter incremented for each removed byte */
} strmData_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdGetBits(strmData_t * pStrmData, u32 numBits);
u32 h264bsdShowBits(strmData_t * pStrmData, u32 numBits);
u32 h264bsdFlushBits(strmData_t * pStrmData, u32 numBits);
u32 h264bsdIsByteAligned(strmData_t *);
#endif /* #ifdef H264HWD_STREAM_H */

View File

@ -0,0 +1,119 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Utility macros and functions
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_util.h,v $
-- $Date: 2008/09/03 05:56:16 $
-- $Revision: 1.2 $
--
------------------------------------------------------------------------------*/
#ifndef H264BSDDEC_UTIL_H
#define H264BSDDEC_UTIL_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "dwl.h"
#include "h264hwd_stream.h"
#include "h264hwd_debug.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#define HANTRO_OK 0
#define HANTRO_NOK 1
#define HANTRO_FALSE (0U)
#define HANTRO_TRUE (1U)
#define MEMORY_ALLOCATION_ERROR 0xFFFF
#define PARAM_SET_ERROR 0xFFF0
/* value to be returned by GetBits if stream buffer is empty */
#define END_OF_STREAM 0xFFFFFFFFU
#define EMPTY_RESIDUAL_INDICATOR 0xFFFFFF
/* macro to mark a residual block empty, i.e. contain zero coefficients */
#define MARK_RESIDUAL_EMPTY(residual) ((residual)[0] = EMPTY_RESIDUAL_INDICATOR)
/* macro to check if residual block is empty */
#define IS_RESIDUAL_EMPTY(residual) ((residual)[0] == EMPTY_RESIDUAL_INDICATOR)
/* macro to get smaller of two values */
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
/* macro to get greater of two values */
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
/* macro to get absolute value */
#define ABS(a) (((a) < 0) ? -(a) : (a))
/* macro to clip a value z, so that x <= z =< y */
#define CLIP3(x,y,z) (((z) < (x)) ? (x) : (((z) > (y)) ? (y) : (z)))
/* macro to clip a value z, so that 0 <= z =< 255 */
#define CLIP1(z) (((z) < 0) ? 0 : (((z) > 255) ? 255 : (z)))
/* macro to allocate memory */
#define ALLOCATE(ptr, count, type) \
{ \
ptr = DWLmalloc((count) * sizeof(type)); \
}
/* macro to free allocated memory */
#define FREE(ptr) \
{ \
if(ptr != NULL) {DWLfree(ptr); ptr = NULL;}\
}
extern const u32 h264bsdQpC[52];
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef enum
{
TOPFIELD = 0,
BOTFIELD = 1,
FRAME = 2
} picStruct_e;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdCountLeadingZeros(u32 value, u32 length);
u32 h264bsdRbspTrailingBits(strmData_t * strmData);
u32 h264bsdMoreRbspData(strmData_t * strmData);
u32 h264bsdNextMbAddress(u32 * pSliceGroupMap, u32 picSizeInMbs,
u32 currMbAddr);
u32 h264CheckCabacZeroWords( strmData_t *strmData );
#endif /* #ifdef H264BSDDEC_UTIL_H */

View File

@ -0,0 +1,73 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode Exp-Golomb code words
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_vlc.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_VLC_H
#define H264HWD_VLC_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeExpGolombUnsigned(strmData_t *pStrmData, u32 *value);
u32 h264bsdDecodeExpGolombSigned(strmData_t *pStrmData, i32 *value);
u32 h264bsdDecodeExpGolombMapped(strmData_t *pStrmData, u32 *value,
u32 isIntra);
u32 h264bsdDecodeExpGolombTruncated(strmData_t *pStrmData, u32 *value,
u32 greaterThanOne);
#endif /* #ifdef H264HWD_VLC_H */

View File

@ -0,0 +1,141 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Decode Video Usability Information (VUI) from the stream
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: h264hwd_vui.h,v $
-- $Date: 2008/03/13 12:48:06 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef H264HWD_VUI_H
#define H264HWD_VUI_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "h264hwd_stream.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#define MAX_CPB_CNT 32
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/* enumerated sample aspect ratios, ASPECT_RATIO_M_N means M:N */
enum
{
ASPECT_RATIO_UNSPECIFIED = 0,
ASPECT_RATIO_1_1,
ASPECT_RATIO_12_11,
ASPECT_RATIO_10_11,
ASPECT_RATIO_16_11,
ASPECT_RATIO_40_33,
ASPECT_RATIO_24_11,
ASPECT_RATIO_20_11,
ASPECT_RATIO_32_11,
ASPECT_RATIO_80_33,
ASPECT_RATIO_18_11,
ASPECT_RATIO_15_11,
ASPECT_RATIO_64_33,
ASPECT_RATIO_160_99,
ASPECT_RATIO_EXTENDED_SAR = 255
};
/* structure to store Hypothetical Reference Decoder (HRD) parameters */
typedef struct
{
u32 cpbCnt;
u32 bitRateScale;
u32 cpbSizeScale;
u32 bitRateValue[MAX_CPB_CNT];
u32 cpbSizeValue[MAX_CPB_CNT];
u32 cbrFlag[MAX_CPB_CNT];
u32 initialCpbRemovalDelayLength;
u32 cpbRemovalDelayLength;
u32 dpbOutputDelayLength;
u32 timeOffsetLength;
} hrdParameters_t;
/* storage for VUI parameters */
typedef struct
{
u32 aspectRatioPresentFlag;
u32 aspectRatioIdc;
u32 sarWidth;
u32 sarHeight;
u32 overscanInfoPresentFlag;
u32 overscanAppropriateFlag;
u32 videoSignalTypePresentFlag;
u32 videoFormat;
u32 videoFullRangeFlag;
u32 colourDescriptionPresentFlag;
u32 colourPrimaries;
u32 transferCharacteristics;
u32 matrixCoefficients;
u32 chromaLocInfoPresentFlag;
u32 chromaSampleLocTypeTopField;
u32 chromaSampleLocTypeBottomField;
u32 timingInfoPresentFlag;
u32 numUnitsInTick;
u32 timeScale;
u32 fixedFrameRateFlag;
u32 nalHrdParametersPresentFlag;
hrdParameters_t nalHrdParameters;
u32 vclHrdParametersPresentFlag;
hrdParameters_t vclHrdParameters;
u32 lowDelayHrdFlag;
u32 picStructPresentFlag;
u32 bitstreamRestrictionFlag;
u32 motionVectorsOverPicBoundariesFlag;
u32 maxBytesPerPicDenom;
u32 maxBitsPerMbDenom;
u32 log2MaxMvLengthHorizontal;
u32 log2MaxMvLengthVertical;
u32 numReorderFrames;
u32 maxDecFrameBuffering;
} vuiParameters_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 h264bsdDecodeVuiParameters(strmData_t *pStrmData,
vuiParameters_t *pVuiParameters);
#endif /* #ifdef H264HWD_VUI_H */

View File

@ -0,0 +1,40 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : JPEG decoder and PP pipeline support
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpeg_pp_pipeline.h,v $
-- $Date: 2007/10/22 08:21:36 $
-- $Revision: 1.2 $
--
------------------------------------------------------------------------------*/
#ifndef JPEG_PP_PIPELINE_H
#define JPEG_PP_PIPELINE_H
#include "decppif.h"
i32 jpegRegisterPP(const void *decInst, const void *ppInst,
void (*PPRun) (const void *, DecPpInterface *),
void (*PPEndCallback) (const void *),
void (*PPConfigQuery) (const void *, DecPpQuery *));
i32 jpegUnregisterPP(const void *decInst, const void *ppInst);
#endif /* #ifdef JPEG_PP_PIPELINE_H */

View File

@ -0,0 +1,45 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Debug Trace funtions
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegasicdbgtrace.h,v $
-- $Revision: 1.1 $
-- $Date: 2007/03/30 05:45:21 $
--
------------------------------------------------------------------------------*/
#ifndef __JPEGDEC_TRACE__
#define __JPEGDEC_TRACE__
#include <stdio.h>
#include "basetype.h"
#include "jpegdeccontainer.h"
void PrintJPEGReg(u32 * regBase);
void ppRegDump(const u32 * regBase);
void DumpJPEGCtrlReg(u32 * regBase, FILE *fd);
void HexDumpJPEGCtrlReg(u32 * regBase, FILE *fd);
void HexDumpJPEGTables(u32 * regBase, JpegDecContainer *pJpegDecCont, FILE *fd);
void HexDumpJPEGOutput(JpegDecContainer *pJpegDecCont, FILE *fd);
void HexDumpRegs(u32 * regBase, FILE *fd);
void ResetAsicBuffers(JpegDecContainer *pJpegDecCont, FILE *fd);
#endif /* __JPEGDEC_TRACE__ */

View File

@ -0,0 +1,69 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Utility macros for debugging and tracing
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdebug.h,v $
-- $Date: 2007/03/30 05:45:21 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef __JPEGDEBUG_H__
#define __JPEGDEBUG_H__
#ifdef _ASSERT_USED
#ifndef ASSERT
#include <assert.h>
#define ASSERT(expr) assert(expr)
#endif
#else
#define ASSERT(expr)
#endif
#ifdef _JPEGDECAPITRACE
#include <stdio.h>
#elif _JPEGDEC_TRACE
#include <stdio.h>
#elif _JPEGDEC_API_TRC
#include <stdio.h>
#elif _JPEGDEC_PP_TRACE
#include <stdio.h>
#elif _DEBUG
#include <stdio.h>
#elif _DEBUG
#include <stdio.h>
#endif
/* macro for debug printing. Note that double parenthesis has to be used, i.e.
* DEBUG(("Debug printing %d\n",%d)) */
#ifdef _JPEGAPITRACE
#define JPEG_API_TRC(args) printf args
#else
#define JPEG_API_TRC(args)
#endif
#ifdef _DEBUG
#define DEBUG(args) printf args
#else
#define DEBUG(args)
#endif
#endif

View File

@ -0,0 +1,237 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : JPEG decoder header file
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdecapi.h,v $
-- $Revision: 1.8 $
-- $Date: 2008/11/12 12:47:03 $
--
------------------------------------------------------------------------------*/
#ifndef __JPEGDECAPI_H__
#define __JPEGDECAPI_H__
#ifdef __cplusplus
extern "C"
{
#endif
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. External compiler flags
3. Module defines
4. Local function prototypes
5. Functions
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "decapicommon.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#define JPEGDEC_YCbCr400 0x080000U
#define JPEGDEC_YCbCr420_SEMIPLANAR 0x020001U
#define JPEGDEC_YCbCr422_SEMIPLANAR 0x010001U
#define JPEGDEC_YCbCr440 0x010004U
#define JPEGDEC_YCbCr411_SEMIPLANAR 0x100000U
#define JPEGDEC_YCbCr444_SEMIPLANAR 0x200000U
#define JPEGDEC_BASELINE 0x0
#define JPEGDEC_PROGRESSIVE 0x1
#define JPEGDEC_NONINTERLEAVED 0x2
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef void *JpegDecInst;
typedef enum
{
JPEGDEC_SLICE_READY = 2,
JPEGDEC_FRAME_READY = 1,
JPEGDEC_STRM_PROCESSED = 3,
JPEGDEC_SCAN_PROCESSED = 4,
JPEGDEC_OK = 0,
JPEGDEC_ERROR = -1,
JPEGDEC_UNSUPPORTED = -2,
JPEGDEC_PARAM_ERROR = -3,
JPEGDEC_MEMFAIL = -4,
JPEGDEC_INITFAIL = -5,
JPEGDEC_INVALID_STREAM_LENGTH = -6,
JPEGDEC_STRM_ERROR = -7,
JPEGDEC_INVALID_INPUT_BUFFER_SIZE = -8,
JPEGDEC_HW_RESERVED = -9,
JPEGDEC_INCREASE_INPUT_BUFFER = -10,
JPEGDEC_SLICE_MODE_UNSUPPORTED = -11,
JPEGDEC_DWL_HW_TIMEOUT = -253,
JPEGDEC_DWL_ERROR = -254,
JPEGDEC_HW_BUS_ERROR = -255,
JPEGDEC_SYSTEM_ERROR = -256,
JPEGDEC_FORMAT_NOT_SUPPORTED = -1000
} JpegDecRet;
enum
{
JPEGDEC_NO_UNITS = 0, /* No units, X and Y specify
* the pixel aspect ratio */
JPEGDEC_DOTS_PER_INCH = 1, /* X and Y are dots per inch */
JPEGDEC_DOTS_PER_CM = 2 /* X and Y are dots per cm */
};
enum
{
JPEGDEC_THUMBNAIL_JPEG = 0x10,
JPEGDEC_THUMBNAIL_NOT_SUPPORTED_FORMAT = 0x11,
JPEGDEC_NO_THUMBNAIL = 0x12
};
enum
{
JPEGDEC_IMAGE = 0,
JPEGDEC_THUMBNAIL = 1
};
typedef struct
{
u32 *pVirtualAddress;
u32 busAddress;
} JpegDecLinearMem;
/* Image information */
typedef struct
{
u32 displayWidth;
u32 displayHeight;
u32 outputWidth; /* Number of pixels/line in the image */
u32 outputHeight; /* Number of lines in in the image */
u32 version;
u32 units;
u32 xDensity;
u32 yDensity;
u32 outputFormat; /* JPEGDEC_YCbCr400
* JPEGDEC_YCbCr420
* JPEGDEC_YCbCr422
*/
u32 codingMode; /* JPEGDEC_BASELINE
* JPEGDEC_PROGRESSIVE
* JPEGDEC_NONINTERLEAVED
*/
u32 thumbnailType; /* Thumbnail exist or not or not supported */
u32 displayWidthThumb;
u32 displayHeightThumb;
u32 outputWidthThumb; /* Number of pixels/line in the image */
u32 outputHeightThumb; /* Number of lines in in the image */
u32 outputFormatThumb; /* JPEGDEC_YCbCr400
* JPEGDEC_YCbCr420
* JPEGDEC_YCbCr422
*/
u32 codingModeThumb; /* JPEGDEC_BASELINE
* JPEGDEC_PROGRESSIVE
* JPEGDEC_NONINTERLEAVED
*/
} JpegDecImageInfo;
/* Decoder input JFIF information */
typedef struct
{
JpegDecLinearMem streamBuffer; /* input stream buffer */
u32 streamLength; /* input stream length or buffer size */
u32 bufferSize; /* input stream buffer size */
u32 decImageType; /* Full image or Thumbnail to be decoded */
u32 sliceMbSet; /* slice mode: mcu rows to decode */
JpegDecLinearMem pictureBufferY; /* luma output address ==> if user allocated */
JpegDecLinearMem pictureBufferCbCr; /* chroma output address ==> if user allocated */
JpegDecLinearMem pictureBufferCr; /* chroma output address ==> if user allocated */
} JpegDecInput;
/* Decoder output */
typedef struct
{
JpegDecLinearMem outputPictureY; /* Pointer to the Luma output image */
JpegDecLinearMem outputPictureCbCr; /* Pointer to the Chroma output image */
JpegDecLinearMem outputPictureCr; /* Pointer to the Chroma output image */
} JpegDecOutput;
typedef struct
{
u32 major; /* API major version */
u32 minor; /* API minor version */
} JpegDecApiVersion;
typedef struct
{
u32 swBuild; /* Software build ID */
u32 hwBuild; /* Hardware build ID */
DecHwConfig hwConfig; /* hardware supported configuration */
} JpegDecBuild;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
/* Version information */
JpegDecApiVersion JpegGetAPIVersion(void);
/* Build information */
JpegDecBuild JpegDecGetBuild(void);
/* Initialization */
JpegDecRet JpegDecInit(JpegDecInst * pDecInst);
/* Release */
void JpegDecRelease(JpegDecInst decInst);
/* Get image information of the JFIF */
JpegDecRet JpegDecGetImageInfo(JpegDecInst decInst,
JpegDecInput * pDecIn,
JpegDecImageInfo * pImageInfo);
/* Decode JFIF */
JpegDecRet JpegDecDecode(JpegDecInst decInst,
JpegDecInput * pDecIn, JpegDecOutput * pDecOut);
/*------------------------------------------------------------------------------
Prototype of the API trace funtion. Traces all API entries and returns.
This must be implemented by the application using the decoder API!
Argument:
string - trace message, a null terminated string
------------------------------------------------------------------------------*/
void JpegDecTrace(const char *string);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,335 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Jpeg Decoder Container
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdeccontainer.h,v $
-- $Revision: 1.22 $
-- $Date: 2009/02/16 08:51:06 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECCONT_H
#define JPEGDECCONT_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "jpegdecapi.h"
#include "dwl.h"
#include "deccfg.h"
#include "decppif.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#ifdef _ASSERT_USED
#include <assert.h>
#endif
/* macro for assertion, used only if compiler flag _ASSERT_USED is defined */
#ifdef _ASSERT_USED
#define ASSERT(expr) assert(expr)
#else
#define ASSERT(expr)
#endif
#define MIN_NUMBER_OF_COMPONENTS 1
#define MAX_NUMBER_OF_COMPONENTS 3
#define JPEGDEC_X170_MIN_BUFFER 5120
#define JPEGDEC_X170_MAX_BUFFER 16776960
#define JPEGDEC_MAX_SLICE_SIZE 4096
#define JPEGDEC_TABLE_SIZE 544
#define JPEGDEC_MIN_WIDTH 48
#define JPEGDEC_MIN_HEIGHT 48
#define JPEGDEC_MAX_WIDTH 4672
#define JPEGDEC_MAX_HEIGHT 4672
#define JPEGDEC_MAX_PIXEL_AMOUNT 16370688
#define JPEGDEC_MAX_WIDTH_8190 8176
#define JPEGDEC_MAX_HEIGHT_8190 8176
#define JPEGDEC_MAX_PIXEL_AMOUNT_8190 66846976
#define JPEGDEC_MAX_SLICE_SIZE_8190 8100
#define JPEGDEC_MAX_WIDTH_TN 256
#define JPEGDEC_MAX_HEIGHT_TN 256
#define JPEGDEC_YUV400 0
#define JPEGDEC_YUV420 2
#define JPEGDEC_YUV422 3
#define JPEGDEC_YUV444 4
#define JPEGDEC_YUV440 5
#define JPEGDEC_YUV411 6
#define JPEGDEC_BASELINE_TABLE_SIZE 544
#define JPEGDEC_PROGRESSIVE_TABLE_SIZE 576
#define JPEGDEC_QP_BASE 32
#define JPEGDEC_AC1_BASE 48
#define JPEGDEC_AC2_BASE 88
#define JPEGDEC_DC1_BASE 129
#define JPEGDEC_DC2_BASE 132
#define JPEGDEC_DC3_BASE 135
/* progressive */
#define JPEGDEC_COEFF_SIZE 96
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
u32 C; /* Component id */
u32 H; /* Horizontal sampling factor */
u32 V; /* Vertical sampling factor */
u32 Tq; /* Quantization table destination selector */
} Components;
typedef struct
{
u8 *pStartOfStream;
u8 *pCurrPos;
u32 streamBus;
u32 bitPosInByte;
u32 streamLength;
u32 readBits;
u32 appnFlag;
u32 thumbnail;
u32 returnSosMarker;
} StreamStorage;
typedef struct
{
u8 *pStartOfImage;
u8 *pLum;
u8 *pCr;
u8 *pCb;
u32 imageReady;
u32 headerReady;
u32 size;
u32 sizeLuma;
u32 sizeChroma;
u32 ready;
u32 columns[MAX_NUMBER_OF_COMPONENTS];
u32 pixelsPerRow[MAX_NUMBER_OF_COMPONENTS];
} ImageData;
typedef struct
{
u32 Lf;
u32 P;
u32 Y;
u32 hwY;
u32 X;
u32 hwX;
u32 Nf; /* Number of components in frame */
u32 codingType;
u32 numMcuInFrame;
u32 numMcuInRow;
u32 mcuNumber;
u32 nextRstNumber;
u32 Ri;
u32 driPeriod;
u32 block;
u32 row;
u32 col;
u32 cIndex;
u32 *pBuffer;
u32 bufferBus;
i32 *pBufferCb;
i32 *pBufferCr;
DWLLinearMem_t pTableBase;
u32 numBlocks[MAX_NUMBER_OF_COMPONENTS];
u32 blocksPerRow[MAX_NUMBER_OF_COMPONENTS];
u32 useAcOffset[MAX_NUMBER_OF_COMPONENTS];
Components component[MAX_NUMBER_OF_COMPONENTS];
} FrameInfo;
typedef struct
{
u32 Ls;
u32 Ns;
u32 Cs[MAX_NUMBER_OF_COMPONENTS]; /* Scan component selector */
u32 Td[MAX_NUMBER_OF_COMPONENTS]; /* Selects table for DC */
u32 Ta[MAX_NUMBER_OF_COMPONENTS]; /* Selects table for AC */
u32 Ss;
u32 Se;
u32 Ah;
u32 Al;
u32 index;
i32 numIdctRows;
i32 pred[MAX_NUMBER_OF_COMPONENTS];
} ScanInfo;
typedef struct
{
u32 sliceHeight;
u32 amountOfQTables;
u32 yCbCrMode;
u32 yCbCr422;
u32 column;
u32 X;
u32 Y;
u32 memSize;
u32 SliceCount;
u32 SliceReadyForPause;
u32 SliceMBCutValue;
u32 pipeline;
u32 userAllocMem;
u32 sliceMbSetValue;
u32 timeout;
u32 rlcMode;
u32 lumaPos;
u32 chromaPos;
u32 sliceStartCount;
u32 amountOfSlices;
u32 noSliceIrqForUser;
u32 sliceLimitReached;
u32 inputBufferEmpty;
u32 fillRight;
u32 fillBottom;
u32 streamEnd;
u32 streamEndFlag;
u32 inputBufferLen;
u32 inputStreaming;
u32 decodedStreamLen;
u32 init;
u32 initThumb;
u32 initBufferSize;
i32 dcRes[MAX_NUMBER_OF_COMPONENTS];
DWLLinearMem_t outLuma;
DWLLinearMem_t outChroma;
DWLLinearMem_t outChroma2;
DWLLinearMem_t givenOutLuma;
DWLLinearMem_t givenOutChroma;
DWLLinearMem_t givenOutChroma2;
i32 pred[MAX_NUMBER_OF_COMPONENTS];
/* progressive parameters */
u32 nonInterleaved;
u32 componentId;
u32 operationType;
u32 operationTypeThumb;
u32 progressiveScanReady;
u32 nonInterleavedScanReady;
u32 allocated;
u32 yCbCrModeOrig;
u32 getInfoYCbCrMode;
u32 components[MAX_NUMBER_OF_COMPONENTS];
DWLLinearMem_t pCoeffBase;
u32 fillX;
u32 fillY;
u32 progressiveFinish;
u32 pfCompId;
u32 pfNeeded[MAX_NUMBER_OF_COMPONENTS];
DWLLinearMem_t tmpStrm;
} DecInfo;
typedef struct
{
DWLLinearMem_t outLumaBuffer;
DWLLinearMem_t outChromaBuffer;
DWLLinearMem_t outChromaBuffer2;
} JpegAsicBuffers;
typedef struct
{
u32 bits[16];
u32 *vals;
u32 tableLength;
u32 start;
u32 last;
} VlcTable;
typedef struct
{
u32 Lh;
VlcTable acTable0;
VlcTable acTable1;
VlcTable acTable2;
VlcTable acTable3;
VlcTable dcTable0;
VlcTable dcTable1;
VlcTable dcTable2;
VlcTable dcTable3;
VlcTable *table;
} HuffmanTables;
typedef struct
{
u32 Lq; /* Quantization table definition length */
u32 table0[64];
u32 table1[64];
u32 table2[64];
u32 table3[64];
u32 *table;
} QuantTables;
typedef struct
{
u32 jpegRegs[DEC_X170_REGISTERS];
u32 asicRunning;
StreamStorage stream;
FrameInfo frame;
ImageData image;
ScanInfo scan;
DecInfo info;
HuffmanTables vlc;
QuantTables quant;
u32 tmpData[64];
u32 is8190;
u32 fuseBurned;
u32 minSupportedWidth;
u32 minSupportedHeight;
u32 maxSupportedWidth;
u32 maxSupportedHeight;
u32 maxSupportedPixelAmount;
u32 maxSupportedSliceSize;
u32 extensionsSupported;
JpegAsicBuffers asicBuff;
DecPpInterface ppControl;
DecPpQuery ppConfigQuery; /* Decoder asks pp info about setup, info stored here */
u32 ppStatus;
const void *dwl; /* DWL instance */
const void *ppInstance;
void (*PPRun) (const void *, DecPpInterface *);
void (*PPEndCallback) (const void *);
void (*PPConfigQuery) (const void *, DecPpQuery *);
} JpegDecContainer;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
#endif /* #endif JPEGDECDATA_H */

View File

@ -0,0 +1,66 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Jpeg decoder header decoding header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdechdrs.h,v $
-- $Revision: 1.1 $
-- $Date: 2007/03/30 05:44:50 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECHDRS_H
#define JPEGDECHDRS_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "jpegdeccontainer.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
JpegDecRet JpegDecDecodeFrameHdr(JpegDecContainer * pDecData);
JpegDecRet JpegDecDecodeQuantTables(JpegDecContainer * pDecData);
JpegDecRet JpegDecDecodeHuffmanTables(JpegDecContainer * pDecData);
JpegDecRet JpegDecMode(JpegDecContainer * pDecData);
JpegDecRet JpegDecMode(JpegDecContainer *);
#endif /* #ifdef MODULE_H */

View File

@ -0,0 +1,82 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Jpeg Decoder Internal functions
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdecinternal.h,v $
-- $Revision: 1.4 $
-- $Date: 2008/09/05 06:25:37 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECINTERNAL_H
#define JPEGDECINTERNAL_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "jpegdecapi.h"
#include "jpegdeccontainer.h"
#ifdef JPEGDEC_ASIC_TRACE
#include <stdio.h>
#endif
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#ifdef JPEGDEC_ASIC_TRACE
#define JPEGDEC_TRACE_INTERNAL(args) printf args
#else
#define JPEGDEC_TRACE_INTERNAL(args)
#endif
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
void JpegDecClearStructs(JpegDecContainer * pJpegDecCont);
JpegDecRet JpegDecInitHW(JpegDecContainer * pJpegDecCont);
void JpegDecInitHWContinue(JpegDecContainer * pJpegDecCont);
void JpegDecInitHWInputBuffLoad(JpegDecContainer * pJpegDecCont);
void JpegDecInitHWProgressiveContinue(JpegDecContainer * pJpegDecCont);
void JpegDecInitHWNonInterleaved(JpegDecContainer * pJpegDecCont);
JpegDecRet JpegDecAllocateResidual(JpegDecContainer * pJpegDecCont);
void JpegDecSliceSizeCalculation(JpegDecContainer * pJpegDecCont);
JpegDecRet JpegDecNextScanHdrs(JpegDecContainer * pJpegDecCont);
void JpegRefreshRegs(JpegDecContainer * pJpegDecCont);
void JpegFlushRegs(JpegDecContainer * pJpegDecCont);
void JpegDecInitHWEmptyScan(JpegDecContainer * pJpegDecCont, u32 componentId);
#endif /* #endif JPEGDECDATA_H */

View File

@ -0,0 +1,128 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : SW Jpeg Decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdecmarkers.h,v $
-- $Revision: 1.1 $
-- $Date: 2007/03/30 05:44:50 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECMARKERS_H
#define JPEGDECMARKERS_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/* JPEG markers, table B.1 page 32 */
enum
{
SOF0 = 0xC0,
SOF1 = 0xC1,
SOF2 = 0xC2,
SOF3 = 0xC3,
SOF5 = 0xC5,
SOF6 = 0xC6,
SOF7 = 0xC7,
SOF9 = 0xC8,
SOF10 = 0xCA,
SOF11 = 0xCB,
SOF13 = 0xCD,
SOF14 = 0xCE,
SOF15 = 0xCF,
JPG = 0xC8,
DHT = 0xC4,
DAC = 0xCC,
SOI = 0xD8,
EOI = 0xD9,
SOS = 0xDA,
DQT = 0xDB,
DNL = 0xDC,
DRI = 0xDD,
DHP = 0xDE,
EXP = 0xDF,
APP0 = 0xE0,
APP1 = 0xE1,
APP2 = 0xE2,
APP3 = 0xE3,
APP4 = 0xE4,
APP5 = 0xE5,
APP6 = 0xE6,
APP7 = 0xE7,
APP8 = 0xE8,
APP9 = 0xE9,
APP10 = 0xEA,
APP11 = 0xEB,
APP12 = 0xEC,
APP13 = 0xED,
APP14 = 0xEE,
APP15 = 0xEF,
JPG0 = 0xF0,
JPG1 = 0xF1,
JPG2 = 0xF2,
JPG3 = 0xF3,
JPG4 = 0xF4,
JPG5 = 0xF5,
JPG6 = 0xF6,
JPG7 = 0xF7,
JPG8 = 0xF8,
JPG9 = 0xF9,
JPG10 = 0xFA,
JPG11 = 0xFB,
JPG12 = 0xFC,
JPG13 = 0xFD,
COM = 0xFE,
TEM = 0x01,
RST0 = 0xD0,
RST1 = 0xD1,
RST2 = 0xD2,
RST3 = 0xD3,
RST4 = 0xD4,
RST5 = 0xD5,
RST6 = 0xD6,
RST7 = 0xD7
};
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
#endif /* #ifdef JPEGDECMARKERS_H */

View File

@ -0,0 +1,63 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : SW Jpeg Decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdecscan.h,v $
-- $Revision: 1.1 $
-- $Date: 2007/03/30 05:44:50 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECSCAN_H
#define JPEGDECSCAN_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "jpegdeccontainer.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
JpegDecRet JpegDecDecodeScan(JpegDecContainer * pDecData);
#endif /* #ifdef MODULE_H */

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Jpeg Decoder utils header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegdecutils.h,v $
-- $Revision: 1.1 $
-- $Date: 2007/03/30 05:44:50 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Module defines
3. Data types
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef JPEGDECUTILS_H
#define JPEGDECUTILS_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "jpegdeccontainer.h"
#include "basetype.h"
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
#define STRM_ERROR 0xFFFFFFFFU
#ifndef OK
#define OK 0
#endif
#ifndef NOK
#define NOK -1
#endif
#ifndef STATIC
#define STATIC static
#endif
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 JpegDecGet2Bytes(StreamStorage * pStream);
u32 JpegDecGetByte(StreamStorage * pStream);
u32 JpegDecShowBits(StreamStorage * pStream);
u32 JpegDecFlushBits(StreamStorage * pStream, u32 bits);
#endif /* #ifdef MODULE_H */

View File

@ -0,0 +1,45 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : X170 JPEG Decoder HW register access functions interface
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: jpegregdrv.h,v $
-- $Date: 2007/06/05 09:37:57 $
-- $Revision: 1.2 $
--
------------------------------------------------------------------------------*/
#ifndef _JPG_HWREGDRV_H_
#define _JPG_HWREGDRV_H_
#include "basetype.h"
#include "deccfg.h"
#include "regdrv.h"
#define JPEG_X170_MODE_JPEG 3
#define JPEGDEC_X170_IRQ_DEC_RDY 0x01
#define JPEGDEC_X170_IRQ_BUS_ERROR 0x02
#define JPEGDEC_X170_IRQ_BUFFER_EMPTY 0x04
#define JPEGDEC_X170_IRQ_ASO 0x08
#define JPEGDEC_X170_IRQ_STREAM_ERROR 0x10
#define JPEGDEC_X170_IRQ_SLICE_READY 0x00
#define JPEGDEC_X170_IRQ_TIMEOUT 0x40
#endif /* #define _JPG_HWREGDRV_H_ */

View File

@ -0,0 +1,86 @@
#ifndef __MFCAPI_H__
#define __MFCAPI_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "dwl.h"
#define RAW_STRM_TYPE_H264 104
#define RAW_STRM_TYPE_JPEG 110
#define RAW_STRM_TYPE_H264_NOREORDER (RAW_STRM_TYPE_H264 | (1 << 8))
#define MAX_OUTFRAME_NUM 8
#define MAX_OUTFRAME_WIDTH 1280
#define MAX_OUTFRAME_HEIGHT 720
typedef struct
{
u32 yBusAddress;
u32 cbcrBusAddress;
u32 crBusAddress;
const void *pyVirAddress;
const void *pcbcrVirAddress;
const void *pcrVirAddress;
i32 keyPicture;
}FrameBuffer;
typedef struct
{
i32 num;
i32 codedWidth;
i32 codedHeight;
i32 frameWidth;
i32 frameHeight;
i32 outputFormat; /* JPEGDEC_YCbCr400/JPEGDEC_YCbCr420/JPEGDEC_YCbCr422 */
FrameBuffer buffer[MAX_OUTFRAME_NUM];
}OutFrameBuffer;
typedef enum{
MFCDEC_RET_OK = 1,
MFCDEC_RET_DECFAIL = 0,
MFCDEC_RET_MEMFAIL = -1,
MFCDEC_RET_LOCKFAIL = -2,
}MFCDecodeRet;
typedef struct
{
void *decInst;
int streamType;
int delayInit;
int outputFormat;
}MFCHandle;
typedef struct {
MFCHandle *handle;
uint32_t jpg_addr;
uint32_t jpg_size;
uint32_t dec_addry;
uint32_t dec_addru;
uint32_t dec_addrv;
uint32_t dec_size;
uint16_t jpg_width;
uint16_t jpg_height;
uint16_t dec_width;
uint16_t dec_height;
uint32_t dec_format;
} JpegHeaderInfo;
MFCHandle *mfc_init(int streamType);
int mfc_decode(MFCHandle *handle, DWLLinearMem_t *inBuffer, OutFrameBuffer *outBuffer);
int mfc_jpegdec(JpegHeaderInfo *jpegInfo);
void mfc_uninit(MFCHandle *handle);
int mfc_pp_init(MFCHandle *handle, int outWidth, int outHeight, int outFormat);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,139 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Hardware interface read/write
--
------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: refbuffer.h,v $
-- $Revision: 1.19 $
-- $Date: 2010/06/23 12:38:11 $
--
------------------------------------------------------------------------------*/
#ifndef __REFBUFFER_H__
#define __REFBUFFER_H__
#include "basetype.h"
typedef enum {
REFBU_FRAME,
REFBU_FIELD,
REFBU_MBAFF
} refbuMode_e;
/* Feature support flags */
#define REFBU_SUPPORT_GENERIC (1)
#define REFBU_SUPPORT_INTERLACED (2)
#define REFBU_SUPPORT_DOUBLE (4)
#define REFBU_SUPPORT_OFFSET (8)
/* Buffering info */
#define REFBU_BUFFER_SINGLE_FIELD (1)
#define REFBU_MULTIPLE_REF_FRAMES (2)
#define REFBU_DISABLE_CHECKPOINT (4)
#define REFBU_FORCE_ADAPTIVE_SINGLE (8)
#ifndef HANTRO_TRUE
#define HANTRO_TRUE (1)
#endif /* HANTRO_TRUE */
#ifndef HANTRO_FALSE
#define HANTRO_FALSE (0)
#endif /* HANTRO_FALSE*/
/* macro to get smaller of two values */
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
/* macro to get greater of two values */
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
typedef struct memAccess {
u32 latency;
u32 nonseq;
u32 seq;
} memAccess_t;
struct refBuffer;
typedef struct refBuffer {
#if 0
i32 ox[3];
#endif
i32 decModeMbWeights[2];
i32 mbWeight;
i32 oy[3];
i32 picWidthInMbs;
i32 picHeightInMbs;
i32 frmSizeInMbs;
i32 fldSizeInMbs;
i32 numIntraBlk[3];
i32 coverage[3];
i32 fldHitsP[3][2];
i32 fldHitsB[3][2];
i32 fldCnt;
i32 mvsPerMb;
i32 filterSize;
/* Thresholds */
i32 predIntraBlk;
i32 predCoverage;
i32 checkpoint;
u32 decMode;
u32 dataExcessMaxPct;
i32 busWidthInBits;
i32 prevLatency;
i32 numCyclesForBuffering;
i32 totalDataForBuffering;
i32 bufferPenalty;
i32 avgCyclesPerMb;
u32 prevWasField;
u32 prevUsedDouble;
i32 thrAdj;
u32 prevFrameHitSum;
memAccess_t currMemModel; /* Clocks per operation, modifiable from
* testbench. */
memAccess_t memAccessStats; /* Approximate counts for operations, set
* based on format */
u32 memAccessStatsFlag;
/* Support flags */
u32 interlacedSupport;
u32 doubleSupport;
u32 offsetSupport;
/* Internal test mode */
void (*testFunction)(struct refBuffer*,u32*regBase,u32 isIntra,u32 mode);
} refBuffer_t;
void RefbuInit( refBuffer_t *pRefbu, u32 decMode, u32 picWidthInMbs, u32
picHeightInMbs, u32 supportFlags );
void RefbuMvStatistics( refBuffer_t *pRefbu, u32 *regBase,
u32 *pMv, u32 directMvsAvailable,
u32 isIntraPicture );
void RefbuMvStatisticsB( refBuffer_t *pRefbu, u32 *regBase );
void RefbuSetup( refBuffer_t *pRefbu, u32 *regBase,
refbuMode_e mode,
u32 isIntraFrame, u32 isBframe,
u32 refPicId0, u32 refpicId1,
u32 flags );
i32 RefbuGetHitThreshold( refBuffer_t *pRefbu );
u32 RefbuVpxGetPrevFrameStats( refBuffer_t *pRefbu );
#endif /* __REFBUFFER_H__ */

View File

@ -0,0 +1,92 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description :
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: regdrv.h,v $
-- $Revision: 1.20 $
-- $Date: 2010/09/07 06:47:34 $
--
------------------------------------------------------------------------------*/
#ifndef REGDRV_H
#define REGDRV_H
/*------------------------------------------------------------------------------
Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
/*------------------------------------------------------------------------------
Module defines
------------------------------------------------------------------------------*/
#define DEC_8170_IRQ_RDY 0x01
#define DEC_8170_IRQ_BUS 0x02
#define DEC_8170_IRQ_BUFFER 0x04
#define DEC_8170_IRQ_ASO 0x08
#define DEC_8170_IRQ_ERROR 0x10
#define DEC_8170_IRQ_SLICE 0x20
#define DEC_8170_IRQ_TIMEOUT 0x40
#define DEC_8190_IRQ_RDY DEC_8170_IRQ_RDY
#define DEC_8190_IRQ_BUS DEC_8170_IRQ_BUS
#define DEC_8190_IRQ_BUFFER DEC_8170_IRQ_BUFFER
#define DEC_8190_IRQ_ASO DEC_8170_IRQ_ASO
#define DEC_8190_IRQ_ERROR DEC_8170_IRQ_ERROR
#define DEC_8190_IRQ_SLICE DEC_8170_IRQ_SLICE
#define DEC_8190_IRQ_TIMEOUT DEC_8170_IRQ_TIMEOUT
typedef enum
{
/* include script-generated part */
#include "8170enum.h"
HWIF_DEC_IRQ_STAT,
HWIF_PP_IRQ_STAT,
HWIF_LAST_REG,
/* aliases */
HWIF_MPEG4_DC_BASE = HWIF_I4X4_OR_DC_BASE,
HWIF_INTRA_4X4_BASE = HWIF_I4X4_OR_DC_BASE,
/* VP6 */
HWIF_VP6HWGOLDEN_BASE = HWIF_REFER4_BASE,
HWIF_VP6HWPART1_BASE = HWIF_REFER13_BASE,
HWIF_VP6HWPART2_BASE = HWIF_RLC_VLC_BASE,
HWIF_VP6HWPROBTBL_BASE = HWIF_QTABLE_BASE,
/* progressive JPEG */
HWIF_PJPEG_COEFF_BUF = HWIF_DIR_MV_BASE,
/* MVC */
HWIF_INTER_VIEW_BASE = HWIF_REFER15_BASE,
} hwIfName_e;
/*------------------------------------------------------------------------------
Data types
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Function prototypes
------------------------------------------------------------------------------*/
void SetDecRegister(u32 * regBase, u32 id, u32 value);
u32 GetDecRegister(const u32 * regBase, u32 id);
#endif /* #ifndef REGDRV_H */

View File

@ -0,0 +1,63 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : API's internal static data storage definition
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_apistorage.h,v $
-- $Date: 2010/02/05 14:24:12 $
-- $Revision: 1.2 $
--
------------------------------------------------------------------------------*/
#ifndef RV_APISTORAGE_H
#define RV_APISTORAGE_H
#include "dwl.h"
typedef struct
{
enum
{
UNINIT,
INITIALIZED,
HEADERSDECODED,
STREAMDECODING,
HW_PIC_STARTED,
HW_STRM_ERROR
} DecStat;
enum
{
NO_BUFFER = 0,
BUFFER_0,
BUFFER_1,
BUFFER_2,
BUFFER_3
} bufferForPp;
DWLLinearMem_t InternalFrameIn;
DWLLinearMem_t InternalFrameOut;
u32 firstHeaders;
u32 disableFilter;
u32 externalBuffers; /* application gives frame buffers */
} DecApiStorage;
#endif /* #ifndef RV_APISTORAGE_H */

View File

@ -0,0 +1,42 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Global configurations.
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_cfg.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_CFG_H
#define RV_CFG_H
/*
* Maximum number of macro blocks in one FRAME
*/
#define RV_MIN_WIDTH 48
#define RV_MIN_HEIGHT 48
#define RVAPI_DEC_MBS 8160
#define MAX_OUTPUT_PICS 2
#endif /* already included #ifndef RV_CFG_H */

View File

@ -0,0 +1,71 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : algorithm header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_container.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_CONTAINER_H
#define RV_CONTAINER_H
#include "basetype.h"
#include "rv_framedesc.h"
#include "rv_mbsetdesc.h"
#include "rv_strmdesc.h"
#include "rv_hdrs.h"
#include "rv_storage.h"
#include "rv_apistorage.h"
#include "rv_cfg.h"
#include "deccfg.h"
#include "decppif.h"
#include "refbuffer.h"
typedef struct
{
u32 rvRegs[DEC_X170_REGISTERS];
DecFrameDesc FrameDesc; /* Frame description */
DecMbSetDesc MbSetDesc; /* Mb set descriptor */
DecStrmDesc StrmDesc;
DecStrmStorage StrmStorage; /* StrmDec storage */
DecHdrs Hdrs;
DecHdrs tmpHdrs; /* for decoding of repeated headers */
DecApiStorage ApiStorage; /* Api's internal data storage */
DecPpInterface ppControl;
DecPpQuery ppConfigQuery; /* Decoder asks pp info about setup, info stored here */
u32 ppStatus;
u32 asicRunning;
u32 mbErrorConceal;
const void *dwl;
u32 refBufSupport;
refBuffer_t refBufferCtrl;
const void *ppInstance;
void (*PPRun) (const void *, DecPpInterface *);
void (*PPEndCallback) (const void *);
void (*PPConfigQuery) (const void *, DecPpQuery *);
void (*PPDisplayIndex)(const void *, u32);
void (*PPBufferData) (const void *, u32, u32, u32);
} DecContainer;
#endif /* #ifndef RV_CONTAINER_H */

View File

@ -0,0 +1,85 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2007 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Utility macros for debugging and tracing
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_debug.h,v $
-- $Date: 2009/03/11 14:01:07 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_DEBUG_H
#define RV_DEBUG_H
#ifdef _ASSERT_USED
#ifndef ASSERT
#include <assert.h>
#define ASSERT(expr) assert(expr)
#endif
#else
#define ASSERT(expr)
#endif
#ifdef _RVAPITRACE
#include <stdio.h>
#endif
#ifdef _RV_DEBUG_TRACE
#include <stdio.h>
#endif
#ifdef _DEBUG_PRINT
#include <stdio.h>
#endif
#ifdef _RVAPITRACE
#define RVFLUSH fflush(stdout)
#endif
#ifdef _DEBUG_PRINT
#define RVFLUSH fflush(stdout)
#endif
#ifndef RVFLUSH
#define RVFLUSH
#endif
/* macro for debug printing. Note that double parenthesis has to be used, i.e.
* DEBUG(("Debug printing %d\n",%d)) */
#ifdef _RVAPITRACE
#define RVDEC_API_DEBUG(args) printf args
#else
#define RVDEC_API_DEBUG(args)
#endif
#ifdef _DEBUG_PRINT
#define RVDEC_DEBUG(args) printf args
#else
#define RVDEC_DEBUG(args)
#endif
#ifdef _DEC_PP_USAGE
#define DECPP_STAND_ALONE 0
#define DECPP_PARALLEL 1
#define DECPP_PIPELINED 2
#define DECPP_UNSPECIFIED 3
void RvDecPpUsagePrint(DecContainer * pDecCont,
u32 ppmode, u32 picIndex, u32 decStatus, u32 picId);
#endif
#endif /* #ifndef RV_DEBUG_H */

View File

@ -0,0 +1,50 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : algorithm header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_framedesc.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*****************************************************************************/
#ifndef RV_FRAMEDESC_H
#define RV_FRAMEDESC_H
#include "basetype.h"
typedef struct
{
u32 frameNumber;
u32 frameTimePictures;
u32 picCodingType;
u32 totalMbInFrame;
u32 frameWidth; /* in macro blocks */
u32 frameHeight; /* in macro blocks */
u32 timeCodeHours;
u32 timeCodeMinutes;
u32 timeCodeSeconds;
u32 vlcSet;
u32 qp;
} DecFrameDesc;
#endif /* #ifndef RV_FRAMEDESC_H */

View File

@ -0,0 +1,52 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract :
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_hdrs.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_HDRS_H
#define RV_HDRS_H
#include "basetype.h"
typedef struct DecTimeCode_t
{
u32 dropFlag;
u32 hours;
u32 minutes;
u32 seconds;
u32 picture;
} DecTimeCode;
typedef struct
{
u32 horizontalSize;
u32 verticalSize;
u32 temporalReference;
u32 pictureCodingType;
} DecHdrs;
#endif /* #ifndef RV_HDRS_H */

View File

@ -0,0 +1,44 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract :
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_headers.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of context
1. xxx...
------------------------------------------------------------------------------*/
#ifndef RV_HEADERS_H
#define RV_HEADERS_H
#include "basetype.h"
#include "rv_container.h"
u32 rv_DecodeSliceHeader(DecContainer * pDecContainer);
#endif /* #ifndef RV_HEADERS_H */

View File

@ -0,0 +1,40 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : algorithm header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_mbsetdesc.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
------------------------------------------------------------------------------*/
#ifndef RV_MBSETDESC_H
#define RV_MBSETDESC_H
#include "basetype.h"
#include "dwl.h"
#include "rvdecapi.h"
typedef struct
{
RvDecOutput outData; /* Return PIC info */
} DecMbSetDesc;
#endif /* #ifndef RV_MBSETDESC_H */

View File

@ -0,0 +1,42 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : RV decoder and PP pipeline support
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_pp_pipeline.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_PP_PIPELINE_H
#define RV_PP_PIPELINE_H
#include "decppif.h"
i32 rvRegisterPP(const void *decInst, const void *ppInst,
void (*PPDecSetup) (const void *, const DecPpInterface *),
void (*PPDecPipelineEndCallback) (const void *),
void (*PPConfigQuery) (const void *, DecPpQuery *),
void (*PPDisplayIndex)(const void *, u32),
void (*PPBufferData) (const void *, u32, u32, u32));
i32 rvUnregisterPP(const void *decInst, const void *ppInst);
#endif /* #ifdef RV_PP_PIPELINE_H */

View File

@ -0,0 +1,59 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract: api internal defines
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_rpr.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Internal Definitions
3. Prototypes of Decoder API internal functions
------------------------------------------------------------------------------*/
#ifndef RV_RPR_H
#define RV_RPR_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "rv_utils.h"
/*------------------------------------------------------------------------------
2. Internal Definitions
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
3. Prototypes of functions
------------------------------------------------------------------------------*/
void rvRpr( picture_t *pSrc,
picture_t *pDst,
DWLLinearMem_t *rprWorkBuffer,
u32 round,
u32 newCodedWidth, u32 newCodedHeight );
#endif /* RV_RPR_H */

View File

@ -0,0 +1,121 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Stream decoding storage definition
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_storage.h,v $
-- $Date: 2010/03/31 08:55:00 $
-- $Revision: 1.7 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of context
1. xxx...
------------------------------------------------------------------------------*/
#ifndef RV_STRMSTORAGE_H
#define RV_STRMSTORAGE_H
#include "basetype.h"
#include "rv_cfg.h"
#include "bqueue.h"
typedef struct
{
DWLLinearMem_t data;
u32 picType;
u32 picId;
u32 tf;
u32 ff[2];
u32 rff;
u32 rfc;
u32 isInter;
u32 nbrErrMbs;
RvDecRet retVal;
u32 sendToPp;
RvDecTime timeCode;
u32 frameWidth, frameHeight;
u32 codedWidth, codedHeight;
} picture_t;
typedef struct
{
u32 status;
u32 strmDecReady;
picture_t pPicBuf[16];
picture_t pRprBuf;
u32 outBuf[16];
u32 outIndex;
u32 outCount;
u32 workOut;
u32 work0;
u32 work1;
u32 latestId; /* current pic id, used for debug */
u32 skipB;
u32 prevPicCodingType;
u32 pictureBroken;
u32 intraFreeze;
u32 rprDetected;
u32 rprNextPicType;
u32 previousB;
u32 previousModeFull;
u32 isRv8;
u32 fwdScale;
u32 bwdScale;
u32 tr;
u32 prevTr;
u32 trb;
DWLLinearMem_t vlcTables;
DWLLinearMem_t directMvs;
DWLLinearMem_t rprWorkBuffer;
DWLLinearMem_t slices;
u32 frameCodeLength;
u32 frameSizes[2*9];
u32 maxFrameWidth, maxFrameHeight;
u32 maxMbsPerFrame;
u32 numSlices;
u32 rawMode;
/* to store number of bits needed to indicate rv9 frame size */
u32 frameSizeBits;
/* used to compute timestamps for output pictures */
u32 picId;
u32 prevPicId;
u32 prevBIdx;
bufferQueue_t bq;
bufferQueue_t bqPp;
u32 maxNumBuffers;
u32 numBuffers;
u32 numPpBuffers;
} DecStrmStorage;
#endif /* #ifndef RV_STRMSTORAGE_H */

View File

@ -0,0 +1,56 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Stream decoding top header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_strm.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of context
1. xxx...
------------------------------------------------------------------------------*/
#ifndef RV_STRMDEC_H
#define RV_STRMDEC_H
#include "rv_container.h"
enum
{
DEC_RDY,
DEC_HDRS_RDY,
DEC_PIC_HDR_RDY,
DEC_PIC_HDR_RDY_RPR,
DEC_PIC_HDR_RDY_ERROR,
DEC_ERROR,
DEC_END_OF_STREAM
};
/* function prototypes */
u32 rv_StrmDecode(DecContainer * pDecContainer);
#endif /* #ifndef RV_STRMDEC_H */

View File

@ -0,0 +1,45 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : algorithm header file
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_strmdesc.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
/*****************************************************************************/
#ifndef RV_STRMDESC_H
#define RV_STRMDESC_H
#include "basetype.h"
typedef struct
{
u8 *pStrmBuffStart; /* pointer to start of stream buffer */
u8 *pStrmCurrPos; /* current read addres in stream buffer */
u32 bitPosInWord; /* bit position in stream buffer */
u32 strmBuffSize; /* size of stream buffer (bytes) */
u32 strmBuffReadBits; /* number of bits read from stream buffer */
} DecStrmDesc;
#endif /* #ifndef RV_STRMDESC_H */

View File

@ -0,0 +1,159 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Header file for stream decoding utilities
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rv_utils.h,v $
-- $Date: 2009/03/11 14:00:12 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef RV_UTILS_H
#define RV_UTILS_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "rv_container.h"
#ifdef _ASSERT_USED
#include <assert.h>
#endif
#ifdef _UTEST
#include <stdio.h>
#endif
/*------------------------------------------------------------------------------
2. Module defines
------------------------------------------------------------------------------*/
/* constant definitions */
#ifndef OK
#define OK 0
#endif
#ifndef NOK
#define NOK 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef NULL
#define NULL 0
#endif
/* decoder states */
enum
{
STATE_OK,
STATE_NOT_READY,
STATE_SYNC_LOST
};
#define HANTRO_OK 0
#define HANTRO_NOK 1
#ifndef NULL
#define NULL 0
#endif
/* Error concealment */
#define FREEZED_PIC_RDY 1
enum
{
RV_I_PIC = 0,
RV_FI_PIC = 1,
RV_P_PIC = 2,
RV_B_PIC = 3
};
enum
{
RV_SLICE
};
/* value to be returned by GetBits if stream buffer is empty */
#define END_OF_STREAM 0xFFFFFFFFU
/* macro for debug printing. Note that double parenthesis has to be used, i.e.
* DEBUG(("Debug printing %d\n",%d)) */
#ifdef _UTEST
#define DEBUG(args) printf args
#else
#define DEBUG(args)
#endif
/* macro for assertion, used only if compiler flag _ASSERT_USED is defined */
#ifdef _ASSERT_USED
#define ASSERT(expr) assert(expr)
#else
#define ASSERT(expr)
#endif
/* macro to check if stream ends */
#define IS_END_OF_STREAM(pContainer) \
( (pContainer)->StrmDesc.strmBuffReadBits == \
(8*(pContainer)->StrmDesc.strmBuffSize) )
/* macro to saturate value to range [min,max]. Note that for unsigned value
* both min and max should be positive, otherwise result will be wrong due to
* arithmetic conversion. If min > max -> value will be equal to min. */
#define SATURATE(min,value,max) \
if ((value) < (min)) (value) = (min); \
else if ((value) > (max)) (value) = (max);
#define ABS(val) (((val) < 0) ? -(val) : (val))
/*------------------------------------------------------------------------------
3. Data types
------------------------------------------------------------------------------*/
typedef struct
{
u8 *pStrmBuffStart; /* pointer to start of stream buffer */
u8 *pStrmCurrPos; /* current read address in stream buffer */
u32 bitPosInWord; /* bit position in stream buffer byte */
u32 strmBuffSize; /* size of stream buffer (bytes) */
u32 strmBuffReadBits; /* number of bits read from stream buffer */
} strmData_t;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
u32 rv_GetBits(DecContainer *, u32 numBits);
u32 rv_ShowBits(DecContainer *, u32 numBits);
u32 rv_ShowBits32(DecContainer *);
u32 rv_FlushBits(DecContainer *, u32 numBits);
u32 rv_CheckStuffing(DecContainer *);
u32 rv_NumBits(u32 value);
#endif /* RV_UTILS_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,226 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2007 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Description : API for the 8190 RV Decoder
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rvdecapi.h,v $
-- $Date: 2010/03/23 10:41:36 $
-- $Revision: 1.7 $
--
------------------------------------------------------------------------------*/
#ifndef __RVDECAPI_H__
#define __RVDECAPI_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include "basetype.h"
#include "decapicommon.h"
/*------------------------------------------------------------------------------
API type definitions
------------------------------------------------------------------------------*/
/* Return values */
typedef enum
{
RVDEC_OK = 0,
RVDEC_STRM_PROCESSED = 1,
RVDEC_PIC_RDY = 2,
RVDEC_HDRS_RDY = 3,
RVDEC_HDRS_NOT_RDY = 4,
RVDEC_PIC_DECODED = 5,
RVDEC_PARAM_ERROR = -1,
RVDEC_STRM_ERROR = -2,
RVDEC_NOT_INITIALIZED = -3,
RVDEC_MEMFAIL = -4,
RVDEC_INITFAIL = -5,
RVDEC_STREAM_NOT_SUPPORTED = -8,
RVDEC_HW_RESERVED = -254,
RVDEC_HW_TIMEOUT = -255,
RVDEC_HW_BUS_ERROR = -256,
RVDEC_SYSTEM_ERROR = -257,
RVDEC_DWL_ERROR = -258,
RVDEC_FORMAT_NOT_SUPPORTED = -1000
} RvDecRet;
/* decoder output picture format */
typedef enum
{
RVDEC_SEMIPLANAR_YUV420 = 0x020001,
RVDEC_TILED_YUV420 = 0x020002
} RvDecOutFormat;
typedef struct
{
u32 *pVirtualAddress;
u32 busAddress;
} RvDecLinearMem;
/* Decoder instance */
typedef void *RvDecInst;
typedef struct
{
u32 offset;
u32 isValid;
} RvDecSliceInfo;
/* Input structure */
typedef struct
{
u8 *pStream; /* Pointer to stream to be decoded */
u32 streamBusAddress; /* DMA bus address of the input stream */
u32 dataLen; /* Number of bytes to be decoded */
u32 picId;
u32 timestamp; /* timestamp of current picture from rv frame header.
* NOTE: timestamp of a B-frame should be adjusted referring
* to its forward reference frame's timestamp */
u32 sliceInfoNum; /* The number of slice offset entries. */
RvDecSliceInfo *pSliceInfo; /* Pointer to the sliceInfo.
* It contains offset value of each slice
* in the data buffer, including start point "0"
* and end point "dataLen" */
} RvDecInput;
/* Time code */
typedef struct
{
u32 hours;
u32 minutes;
u32 seconds;
u32 pictures;
} RvDecTime;
typedef struct
{
u8 *pStrmCurrPos;
u32 strmCurrBusAddress; /* DMA bus address location where the decoding
* ended */
u32 dataLeft;
u32 picId; /* Identifier of the picture (in enc/dec order) */
u32 picType; /* picture coding type */
u32 timestamp; /* timestamp for media player */
u32 picWidth; /* Pixel width, up round */
u32 picHeight; /* Pixel height, up round */
RvDecOutFormat outputFormat; /* format of the output picture */
} RvDecOutput;
/* stream info filled by RvDecGetInfo */
typedef struct
{
u32 frameWidth;
u32 frameHeight;
u32 codedWidth;
u32 codedHeight;
u32 profileAndLevelIndication;
u32 sampleAspectRatio;
u32 DisplayAspectRatio;
u32 streamFormat;
u32 videoFormat;
u32 videoRange; /* ??? only [0-255] */
u32 interlacedSequence;
u32 multiBuffPpSize;
RvDecOutFormat outputFormat;
} RvDecInfo;
typedef struct
{
u8 *pOutputPicture;
u32 outputPictureBusAddress;
u32 frameWidth;
u32 frameHeight;
u32 codedWidth;
u32 codedHeight;
u32 keyPicture;
u32 picId;
u32 interlaced;
u32 fieldPicture;
u32 topField;
u32 firstField;
u32 repeatFirstField;
u32 repeatFrameCount;
u32 numberOfErrMBs;
RvDecTime timeCode;
} RvDecPicture;
/* Version information */
typedef struct
{
u32 major; /* API major version */
u32 minor; /* API minor version */
} RvDecApiVersion;
typedef struct
{
u32 swBuild; /* Software build ID */
u32 hwBuild; /* Hardware build ID */
DecHwConfig hwConfig; /* hardware supported configuration */
} RvDecBuild;
/*------------------------------------------------------------------------------
Prototypes of Decoder API functions
------------------------------------------------------------------------------*/
RvDecApiVersion RvDecGetAPIVersion(void);
RvDecBuild RvDecGetBuild(void);
RvDecRet RvDecInit(RvDecInst * pDecInst,
u32 useVideoFreezeConcealment,
u32 frameCodeLength,
u32 *frameSizes,
u32 rvVersion,
u32 maxFrameWidth, u32 maxFrameHeight,
u32 numFrameBuffers );
RvDecRet RvDecDecode(RvDecInst decInst,
RvDecInput * pInput,
RvDecOutput * pOutput);
RvDecRet RvDecGetInfo(RvDecInst decInst, RvDecInfo * pDecInfo);
RvDecRet RvDecNextPicture(RvDecInst decInst,
RvDecPicture * pPicture,
u32 endOfStream);
void RvDecRelease(RvDecInst decInst);
RvDecRet RvDecPeek(RvDecInst decInst, RvDecPicture * pPicture);
/*------------------------------------------------------------------------------
Prototype of the API trace funtion. Traces all API entries and returns.
This must be implemented by the application using the decoder API!
Argument:
string - trace message, a null terminated string
------------------------------------------------------------------------------*/
void RvDecTrace(const char *string);
#ifdef __cplusplus
}
#endif
#endif /* __RVDECAPI_H__ */

View File

@ -0,0 +1,89 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract: api internal defines
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: rvdecapi_internal.h,v $
-- $Date: 2009/05/08 07:04:48 $
-- $Revision: 1.2 $
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of contents
1. Include headers
2. Internal Definitions
3. Prototypes of Decoder API internal functions
------------------------------------------------------------------------------*/
#ifndef RV_DECAPI_INTERNAL_H
#define RV_DECAPI_INTERNAL_H
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "rv_cfg.h"
#include "rv_utils.h"
#include "rvdecapi.h"
/*------------------------------------------------------------------------------
2. Internal Definitions
------------------------------------------------------------------------------*/
#define RV_DEC_X170_IRQ_DEC_RDY 0x01
#define RV_DEC_X170_IRQ_BUS_ERROR 0x02
#define RV_DEC_X170_IRQ_BUFFER_EMPTY 0x04
#define RV_DEC_X170_IRQ_ASO 0x08
#define RV_DEC_X170_IRQ_STREAM_ERROR 0x10
#define RV_DEC_X170_IRQ_TIMEOUT 0x40
#define RV_DEC_X170_IRQ_CLEAR_ALL 0xFF
#define RV_DEC_X170_MAX_NUM_SLICES (128)
/*
* Size of internal frame buffers (in 32bit-words) per macro block
*/
#define RVAPI_DEC_FRAME_BUFF_SIZE 96
#ifndef NULL
#define NULL 0
#endif
#define SWAP_POINTERS(A, B, T) T = A; A = B; B = T;
#define INVALID_ANCHOR_PICTURE ((u32)-1)
/*------------------------------------------------------------------------------
3. Prototypes of Decoder API internal functions
------------------------------------------------------------------------------*/
void rvAPI_InitDataStructures(DecContainer * pDecCont);
void rvDecTimeCode(DecContainer * pDecCont, RvDecTime * timeCode);
RvDecRet rvAllocateBuffers(DecContainer * pDecCont);
RvDecRet rvDecCheckSupport(DecContainer * pDecCont);
void rvDecPreparePicReturn(DecContainer * pDecCont);
void rvDecAspectRatio(DecContainer * pDecCont, RvDecInfo * pDecInfo);
void rvDecBufferPicture(DecContainer * pDecCont, u32 picId, u32 bufferB,
u32 isInter, RvDecRet returnValue, u32 nbrErrMbs);
void rvFreeBuffers(DecContainer * pDecCont);
void rvInitVlcTables(DecContainer * pDecCont);
#endif /* RV_DECAPI_INTERNAL_H */

View File

@ -0,0 +1,38 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Header file for stream decoding utilities
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: tiledref.h,v $
-- $Date: 2010/12/01 12:31:03 $
-- $Revision: 1.1 $
--
------------------------------------------------------------------------------*/
#ifndef TILEDREF_H_DEFINED
#define TILEDREF_H_DEFINED
#include "basetype.h"
#define TILED_REF_NONE (0)
#define TILED_REF_8x4 (1)
u32 DecSetupTiledReference( u32 *regBase, u32 tiledModeSupport, u32 interlacedStream );
#endif /* TILEDREF_H_DEFINED */

View File

@ -0,0 +1,62 @@
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced --
-- on all copies and should not be removed. --
-- --
--------------------------------------------------------------------------------
--
-- Abstract : Header file for stream decoding utilities
--
--------------------------------------------------------------------------------
--
-- Version control information, please leave untouched.
--
-- $RCSfile: workaround.h,v $
-- $Date: 2010/06/11 06:25:28 $
-- $Revision: 1.3 $
--
------------------------------------------------------------------------------*/
#ifndef WORKAROUND_H_DEFINED
#define WORKAROUND_H_DEFINED
#include "basetype.h"
/* Union containing structures to hold different formats' workarounds. */
typedef union workaround_s
{
struct {
u32 stuffing;
u32 startCode;
} mpeg;
struct {
u32 multibuffer;
} rv;
} workaround_t;
#ifndef HANTRO_TRUE
#define HANTRO_TRUE (1)
#endif /* HANTRO_TRUE */
#ifndef HANTRO_FALSE
#define HANTRO_FALSE (0)
#endif /* HANTRO_FALSE*/
void InitWorkarounds(u32 decMode, workaround_t *pWorkarounds );
void PrepareStuffingWorkaround( u8 *pDecOut, u32 vopWidth, u32 vopHeight );
u32 ProcessStuffingWorkaround( u8 * pDecOut, u8 * pRefPic, u32 vopWidth,
u32 vopHeight );
void PrepareStartCodeWorkaround( u8 *pDecOut, u32 vopWidth, u32 vopHeight,
u32 topField );
u32 ProcessStartCodeWorkaround( u8 *pDecOut, u32 vopWidth, u32 vopHeight,
u32 topField );
#endif /* WORKAROUND_H_DEFINED */