void PVAVCDecoder::GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right) { AVCDecSPSInfo seqInfo; PVAVCDecGetSeqInfo((AVCHandle *)&iAvcHandle, &seqInfo); *width = seqInfo.FrameWidth; *height = seqInfo.FrameHeight; /* assuming top left corner aligned */ *top = seqInfo.frame_crop_top; *left = seqInfo.frame_crop_left; *bottom = seqInfo.frame_crop_bottom; *right = seqInfo.frame_crop_right; }
int32 AvcDecoder_OMX::ActivateSPS_OMX(void* aUserData, uint aSizeInMbs, uint aNumBuffers) { OSCL_UNUSED_ARG(aUserData); PVAVCDecGetSeqInfo(&(AvcHandle), &(SeqInfo)); if (pDpbBuffer) { oscl_free(pDpbBuffer); pDpbBuffer = NULL; } FrameSize = (aSizeInMbs << 7) * 3; pDpbBuffer = (uint8*) oscl_malloc(aNumBuffers * (FrameSize)); return 1; }