ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <kernel.h>
#include "libmpeg.h"
#include "libmpeg_internal.h"
Go to the source code of this file.
Functions | |
static void * | _init_seq (void) |
static void | _destroy_seq (void) |
static int | _get_hdr (void) |
static void | _seq_header (void) |
static void | _gop_header (void) |
static void | _pic_header (void) |
static void | _ext_and_ud (void) |
static void | _ext_unknown (void) |
static void | _ext_seq (void) |
static void | _ext_seq_dsp (void) |
static void | _ext_qnt_mtx (void) |
static void | _ext_cpy_rgt (void) |
static void | _ext_seq_scl (void) |
static void | _ext_pic_dsp (void) |
static void | _ext_pic_cod (void) |
static void | _ext_pic_ssc (void) |
static void | _ext_pic_tsc (void) |
static void | _xtra_bitinf (void) |
static int | _get_next_picture (void *, s64 *) |
static int | _get_first_picture (void *, s64 *) |
static void | _mpeg12_picture_data (void) |
static int | _mpeg12_slice (int) |
static int | _mpeg12_dec_mb (int *, int *, int[2][2][2], int[2][2], int[2]) |
void | MPEG_Initialize (int(*apDataCB)(void *), void *apDataCBParam, void *(*apInitCB)(void *, MPEGSequenceInfo *), void *apInitCBParam, s64 *apCurPTS) |
void | MPEG_Destroy (void) |
static void | _mpeg12_do_next_mc (void) |
static void | _mpeg12_do_first_mc (void) |
static void | _mpeg12_decode_motion_vector (int *apPred, int aRSize, int aMotionCode, int aMotionResidual, int aFullPelVector) |
static void | _mpeg12_dual_prime_vector (int aDMV[][2], int *apDMVector, int aMVX, int aMVY) |
static void | _mpeg12_motion_vector (int *apPMV, int *apDMVector, int aHRSize, int aVRSize, int aDMV, int aMVScale, int aFullPelVector) |
static void | _mpeg12_motion_vectors (int aPMV[2][2][2], int aDMVector[2], int aMVFS[2][2], int aS, int anMV, int aMVFmt, int aHRSize, int aVRSize, int aDMV, int aMVScale) |
static void | _mpeg12_get_ref (_MPEGMacroBlock8 *apMBSrc, int aX, int anY, int aDX, int aDY, int aH, int aFSrc, int aFDst, int afAvg) |
static void | _mpeg12_get_refs (int aBX, int aBY, int aMBType, int aMotionType, int aPMV[2][2][2], int aMVFS[2][2], int aDMVector[2]) |
static void | _mpeg2_mc (int aMBA, int aMBType, int aMotionType, int aPMV[2][2][2], int aMVFS[2][2], int aDMVector[2], int aMBAI) |
Variables | |
static _MPEGContext | s_MPEG12Ctx |
static s64 * | s_pCurPTS |
static void(* | LumaOp [8])(_MPEGMotion *) |
static void(* | ChromaOp [8])(void) |
static void(* | PutBlockOp [3])(_MPEGMotions *) |
static void(* | AddBlockOp [2][2])(_MPEGMotions *) |
static float | s_FrameRate [16] |
static void *(* | _init_cb )(void *, MPEGSequenceInfo *) |
static void * | s_pInitCBParam |
int(* | MPEG_Picture )(void *, s64 *) |
static void(* | DoMC )(void) |
|
static |
Definition at line 172 of file libmpeg.c.
References _get_first_picture(), _MPEGContext::m_MBHeight, _MPEGContext::m_MBWidth, _MPEGContext::m_pAuxFrame, _MPEGContext::m_pBckFrame, _MPEGContext::m_pFwdFrame, _MPEGContext::m_pMBXY, MPEG_Picture, NULL, and s_MPEG12Ctx.
Referenced by _init_seq(), and MPEG_Destroy().
|
static |
Definition at line 302 of file libmpeg.c.
References _ext_cpy_rgt(), _ext_pic_cod(), _ext_pic_dsp(), _ext_pic_ssc(), _ext_pic_tsc(), _ext_qnt_mtx(), _ext_seq(), _ext_seq_dsp(), _ext_seq_scl(), _ext_unknown(), _MPEG_CODE_EXTENSION, _MPEG_CODE_USER_DATA, _MPEG_GetBits(), _MPEG_NextStartCode(), _MPEG_XID_0, _MPEG_XID_6, _MPEG_XID_COPYRIGHT, _MPEG_XID_DISPLAY, _MPEG_XID_PIC_COD, _MPEG_XID_PIC_DSP, _MPEG_XID_PIC_SSC, _MPEG_XID_PIC_TSC, _MPEG_XID_QMATRIX, _MPEG_XID_SCALABLE, and _MPEG_XID_SEQUENCE.
Referenced by _gop_header(), _pic_header(), and _seq_header().
|
static |
|
static |
Definition at line 522 of file libmpeg.c.
References _MPEG_GetBits(), _MPEG_SetIDCP(), _MPEG_SetQSTIVFAS(), _MPEGContext::m_FCode, _MPEGContext::m_fConsMV, _MPEGContext::m_fFPFrmDCT, _MPEGContext::m_fRepFF, _MPEGContext::m_fTopFF, _MPEGContext::m_PictStruct, and s_MPEG12Ctx.
Referenced by _ext_and_ud().
|
static |
Definition at line 494 of file libmpeg.c.
References _MPEG_GetBits(), _MPEG_PS_FRAME, _MPEGContext::m_fProgSeq, _MPEGContext::m_fRepFF, _MPEGContext::m_fTopFF, _MPEGContext::m_PictStruct, and s_MPEG12Ctx.
Referenced by _ext_and_ud().
|
static |
Definition at line 555 of file libmpeg.c.
Referenced by _ext_and_ud().
|
static |
Definition at line 559 of file libmpeg.c.
Referenced by _ext_and_ud().
|
static |
Definition at line 459 of file libmpeg.c.
References _MPEG_GetBits(), and _MPEG_SetQM().
Referenced by _ext_and_ud().
|
static |
Definition at line 381 of file libmpeg.c.
References _MPEG_GetBits(), MPEGSequenceInfo::m_ChromaFmt, _MPEGContext::m_fMPEG2, _MPEGContext::m_fProgSeq, _MPEGContext::m_FRCode, MPEGSequenceInfo::m_Height, MPEGSequenceInfo::m_Level, MPEGSequenceInfo::m_MSPerFrame, MPEGSequenceInfo::m_Profile, _MPEGContext::m_SI, MPEGSequenceInfo::m_Width, MPEG_LEVEL_MAIN, MPEG_PROFILE_422, s_FrameRate, and s_MPEG12Ctx.
Referenced by _ext_and_ud().
|
static |
Definition at line 437 of file libmpeg.c.
References _MPEG_GetBits(), _MPEGContext::m_SI, MPEGSequenceInfo::m_VideoFmt, and s_MPEG12Ctx.
Referenced by _ext_and_ud().
|
static |
Definition at line 490 of file libmpeg.c.
Referenced by _ext_and_ud().
|
static |
Definition at line 376 of file libmpeg.c.
Referenced by _ext_and_ud().
|
static |
Definition at line 569 of file libmpeg.c.
References _get_hdr(), _get_next_picture(), _init_seq(), _mpeg12_picture_data(), _MPEG_PS_FRAME, MPEGSequenceInfo::m_FrameCnt, _MPEGContext::m_fSecField, _MPEGContext::m_PictStruct, _MPEGContext::m_SI, MPEG_Picture, and s_MPEG12Ctx.
Referenced by _destroy_seq(), _get_hdr(), and MPEG_Initialize().
|
static |
Definition at line 201 of file libmpeg.c.
References _get_first_picture(), _gop_header(), _MPEG_CODE_GRP_START, _MPEG_CODE_PIC_START, _MPEG_CODE_SEQ_END, _MPEG_CODE_SEQ_HDR, _MPEG_GetBits(), _MPEG_NextStartCode(), _pic_header(), _seq_header(), and MPEG_Picture.
Referenced by _get_first_picture(), and _get_next_picture().
|
static |
Definition at line 594 of file libmpeg.c.
References _get_hdr(), _mpeg12_picture_data(), _MPEG_CSCImage(), _MPEG_PS_FRAME, _MPEG_PT_B, _MPEGContext::m_AuxPTS, MPEGSequenceInfo::m_FrameCnt, _MPEGContext::m_fSecField, _MPEGContext::m_FwdPTS, _MPEGContext::m_MBCount, _MPEGContext::m_pAuxFrame, _MPEGContext::m_pFwdFrame, _MPEGContext::m_PictCodingType, _MPEGContext::m_PictStruct, _MPEGContext::m_SI, and s_MPEG12Ctx.
Referenced by _get_first_picture().
|
static |
Definition at line 260 of file libmpeg.c.
References _ext_and_ud(), and _MPEG_GetBits().
Referenced by _get_hdr().
|
static |
Definition at line 124 of file libmpeg.c.
References _destroy_seq(), _init_cb, _MPEG_PS_FRAME, _MPEGContext::m_fFPFrmDCT, _MPEGContext::m_fMPEG2, _MPEGContext::m_fProgSeq, MPEGSequenceInfo::m_Height, _MPEGContext::m_MBCount, _MPEGContext::m_MBHeight, _MPEGContext::m_MBStride, _MPEGContext::m_MBWidth, _MPEGContext::m_pAuxFrame, _MPEGContext::m_pBckFrame, _MPEGContext::m_pFwdFrame, _MPEGContext::m_PictStruct, _MPEGContext::m_pMBXY, _MPEGContext::m_SI, MPEGSequenceInfo::m_Width, _MPEGMBXY::m_X, _MPEGMBXY::m_Y, s_MPEG12Ctx, and s_pInitCBParam.
Referenced by _get_first_picture().
|
static |
Definition at line 818 of file libmpeg.c.
References _mpeg12_motion_vector(), _mpeg12_motion_vectors(), _MPEG_BDEC(), _MPEG_GetBits(), _MPEG_GetMBType(), _MPEG_MBT_INTRA, _MPEG_MBT_MOTION_BACKWARD, _MPEG_MBT_MOTION_FORWARD, _MPEG_MBT_PATTERN, _MPEG_MBT_QUANT, _MPEG_MC_16X8, _MPEG_MC_DMV, _MPEG_MC_FIELD, _MPEG_MC_FRAME, _MPEG_MV_FIELD, _MPEG_MV_FRAME, _MPEG_PS_BOTTOM_FIELD, _MPEG_PS_FRAME, _MPEG_PT_P, _MPEGContext::m_BckFCode, _MPEGContext::m_FCode, _MPEGContext::m_fConsMV, _MPEGContext::m_fDCRst, _MPEGContext::m_fError, _MPEGContext::m_fFPFrmDCT, _MPEGContext::m_fMPEG2, _MPEGContext::m_FPBVector, _MPEGContext::m_FPFVector, _MPEGContext::m_FwdFCode, _MPEGContext::m_pCurMotions, _MPEGContext::m_PictCodingType, _MPEGContext::m_PictStruct, _MPEGContext::m_QScale, and s_MPEG12Ctx.
Referenced by _mpeg12_slice().
|
static |
|
static |
Definition at line 652 of file libmpeg.c.
References _mpeg12_do_next_mc(), and DoMC.
Referenced by _mpeg12_picture_data().
|
static |
Definition at line 636 of file libmpeg.c.
References _MPEG_do_mc(), _MPEGContext::m_CurMC, _MPEGContext::m_MC, and s_MPEG12Ctx.
Referenced by _mpeg12_do_first_mc().
|
static |
Definition at line 725 of file libmpeg.c.
References _MPEG_PS_FRAME, _MPEG_PS_TOP_FIELD, _MPEGContext::m_fTopFF, _MPEGContext::m_PictStruct, and s_MPEG12Ctx.
Referenced by _mpeg12_get_refs().
|
static |
Definition at line 932 of file libmpeg.c.
References ChromaOp, LumaOp, _MPEGContext::m_MBWidth, _MPEGContext::m_pCurMotions, and s_MPEG12Ctx.
Referenced by _mpeg12_get_refs().
|
static |
Definition at line 975 of file libmpeg.c.
References _mpeg12_dual_prime_vector(), _mpeg12_get_ref(), _MPEG_dma_ref_image(), _MPEG_MBT_MOTION_BACKWARD, _MPEG_MBT_MOTION_FORWARD, _MPEG_MC_16X8, _MPEG_MC_DMV, _MPEG_MC_FIELD, _MPEG_MC_FRAME, _MPEG_PS_BOTTOM_FIELD, _MPEG_PS_FRAME, _MPEG_PT_P, _MPEGContext::m_fSecField, _MPEGContext::m_MBWidth, _MPEGContext::m_pBckFrame, _MPEGContext::m_pCurMotions, _MPEGContext::m_pFwdFrame, _MPEGContext::m_PictCodingType, _MPEGContext::m_PictStruct, and s_MPEG12Ctx.
Referenced by _mpeg2_mc().
|
static |
Definition at line 760 of file libmpeg.c.
References _mpeg12_decode_motion_vector(), _MPEG_GetBits(), _MPEG_GetDMVector(), _MPEG_GetMotionCode(), _MPEGContext::m_fError, and s_MPEG12Ctx.
Referenced by _mpeg12_dec_mb(), and _mpeg12_motion_vectors().
|
static |
Definition at line 792 of file libmpeg.c.
References _mpeg12_motion_vector(), _MPEG_GetBits(), and _MPEG_MV_FIELD.
Referenced by _mpeg12_dec_mb().
|
static |
Definition at line 658 of file libmpeg.c.
References _mpeg12_do_first_mc(), _mpeg12_slice(), _MPEG_PS_BOTTOM_FIELD, _MPEG_PS_FRAME, _MPEG_PT_B, _MPEG_WaitBDEC(), DoMC, _MPEGContext::m_AuxPTS, _MPEGContext::m_BckPTS, _MPEGContext::m_CurMC, _MPEGContext::m_fSecField, _MPEGContext::m_FwdPTS, _MPEGContext::m_MBHeight, _MPEGContext::m_MBWidth, _MPEGContext::m_pAuxFrame, _MPEGContext::m_pBckFrame, _MPEGContext::m_pCurFrame, _MPEGContext::m_pCurFrameCbCr, _MPEGContext::m_pCurFrameY, _MPEGContext::m_pFwdFrame, _MPEGContext::m_PictCodingType, _MPEGContext::m_PictStruct, s_MPEG12Ctx, and s_pCurPTS.
Referenced by _get_first_picture(), and _get_next_picture().
|
static |
Definition at line 1199 of file libmpeg.c.
References _mpeg12_dec_mb(), _mpeg2_mc(), _MPEG_CODE_SLICE_MAX, _MPEG_GetBits(), _MPEG_GetMBAI(), _MPEG_MBT_INTRA, _MPEG_MC_FIELD, _MPEG_MC_FRAME, _MPEG_NextStartCode(), _MPEG_PS_BOTTOM_FIELD, _MPEG_PS_FRAME, _MPEG_PT_P, _MPEG_ShowBits(), _MPEG_WaitBDEC(), _xtra_bitinf(), DoMC, _MPEGContext::m_CurMC, _MPEGContext::m_fDCRst, _MPEGContext::m_fError, _MPEGContext::m_MBWidth, _MPEGContext::m_MC, _MPEGContext::m_pCurMotions, _MPEGContext::m_PictCodingType, _MPEGContext::m_PictStruct, _MPEGContext::m_QScale, and s_MPEG12Ctx.
Referenced by _mpeg12_picture_data().
|
static |
Definition at line 1156 of file libmpeg.c.
References _mpeg12_get_refs(), _MPEG_MBT_INTRA, _MPEG_MBT_PATTERN, _MPEG_MC_FIELD, _MPEG_PS_FRAME, AddBlockOp, _MPEGContext::m_MBStride, _MPEGContext::m_MBWidth, _MPEGContext::m_pCurFrameCbCr, _MPEGContext::m_pCurFrameY, _MPEGContext::m_pCurMotions, _MPEGContext::m_PictStruct, _MPEGContext::m_pMBXY, _MPEGMBXY::m_X, _MPEGMBXY::m_Y, NULL, PutBlockOp, s_MPEG12Ctx, and UNCACHED_SEG.
Referenced by _mpeg12_slice().
|
static |
Definition at line 277 of file libmpeg.c.
References _ext_and_ud(), _MPEG_GetBits(), _MPEG_PT_B, _MPEG_PT_P, _MPEG_SetPCT(), _xtra_bitinf(), _MPEGContext::m_BckFCode, _MPEGContext::m_FPBVector, _MPEGContext::m_FPFVector, _MPEGContext::m_FwdFCode, _MPEGContext::m_PictCodingType, and s_MPEG12Ctx.
Referenced by _get_hdr().
|
static |
Definition at line 234 of file libmpeg.c.
References _ext_and_ud(), _MPEG_GetBits(), _MPEG_SetDefQM(), _MPEG_SetQM(), _MPEGContext::m_FRCode, MPEGSequenceInfo::m_Height, MPEGSequenceInfo::m_MSPerFrame, _MPEGContext::m_SI, MPEGSequenceInfo::m_Width, s_FrameRate, and s_MPEG12Ctx.
Referenced by _get_hdr().
|
static |
Definition at line 563 of file libmpeg.c.
References _MPEG_GetBits().
Referenced by _mpeg12_slice(), and _pic_header().
void MPEG_Destroy | ( | void | ) |
Definition at line 117 of file libmpeg.c.
References _destroy_seq(), and _MPEG_Destroy().
Referenced by main().
void MPEG_Initialize | ( | int(*)(void *) | apDataCB, |
void * | apDataCBParam, | ||
void *(*)(void *, MPEGSequenceInfo *) | apInitCB, | ||
void * | apInitCBParam, | ||
s64 * | apCurPTS | ||
) |
Definition at line 84 of file libmpeg.c.
References _get_first_picture(), _init_cb, _MPEG_Initialize(), MPEGSequenceInfo::m_ChromaFmt, MPEGSequenceInfo::m_fEOF, _MPEGContext::m_fMPEG2, MPEGSequenceInfo::m_FrameCnt, MPEGSequenceInfo::m_Level, _MPEGContext::m_MC, MPEGSequenceInfo::m_Profile, _MPEGMotions::m_pSPRBlk, _MPEGMotions::m_pSPRMC, _MPEGMotions::m_pSPRRes, _MPEGContext::m_SI, MPEGSequenceInfo::m_VideoFmt, MPEG_CHROMA_FORMAT_420, MPEG_Picture, MPEG_VIDEO_FORMAT_UNSPEC, s_MPEG12Ctx, s_pCurPTS, and s_pInitCBParam.
|
static |
Definition at line 49 of file libmpeg.c.
Referenced by _init_seq(), and MPEG_Initialize().
|
static |
Definition at line 37 of file libmpeg.c.
Referenced by _mpeg2_mc().
|
static |
Definition at line 28 of file libmpeg.c.
Referenced by _mpeg12_get_ref().
|
static |
Definition at line 78 of file libmpeg.c.
Referenced by _mpeg12_do_first_mc(), _mpeg12_picture_data(), and _mpeg12_slice().
|
static |
Definition at line 23 of file libmpeg.c.
Referenced by _mpeg12_get_ref().
Definition at line 76 of file libmpeg.c.
Referenced by _destroy_seq(), _get_first_picture(), _get_hdr(), and MPEG_Initialize().
|
static |
Definition at line 33 of file libmpeg.c.
Referenced by _mpeg2_mc().
|
static |
Definition at line 42 of file libmpeg.c.
Referenced by _ext_seq(), and _seq_header().
|
static |
Definition at line 20 of file libmpeg.c.
Referenced by _destroy_seq(), _ext_pic_cod(), _ext_pic_dsp(), _ext_seq(), _ext_seq_dsp(), _get_first_picture(), _get_next_picture(), _init_seq(), _mpeg12_dec_mb(), _mpeg12_do_next_mc(), _mpeg12_dual_prime_vector(), _mpeg12_get_ref(), _mpeg12_get_refs(), _mpeg12_motion_vector(), _mpeg12_picture_data(), _mpeg12_slice(), _mpeg2_mc(), _pic_header(), _seq_header(), and MPEG_Initialize().
|
static |
Definition at line 21 of file libmpeg.c.
Referenced by _mpeg12_picture_data(), and MPEG_Initialize().
|
static |
Definition at line 50 of file libmpeg.c.
Referenced by _init_seq(), and MPEG_Initialize().