Home | History | Annotate | Download | only in src

Lines Matching refs:video

196     AVCCommonObj *video;
227 video = decvid->common;
228 memset(video, 0, sizeof(AVCCommonObj));
230 video->seq_parameter_set_id = 9999; /* set it to some illegal value */
244 video = decvid->common;
251 video->forbidden_bit = nal_unit[0] >> 7;
252 if (video->forbidden_bit) return AVCDEC_FAIL;
253 video->nal_ref_idc = (nal_unit[0] & 0x60) >> 5;
254 video->nal_unit_type = (AVCNalUnitType)(nal_unit[0] & 0x1F);
256 if (video->nal_unit_type != AVC_NALTYPE_SPS) /* not a SPS NAL */
267 video->currSeqParams = NULL; /* initialize it to NULL */
268 video->currPicParams = NULL;
278 video->MbToSliceGroupMap = NULL;
280 video->mem_mgr_ctrl_eq_5 = FALSE;
281 video->newPic = TRUE;
282 video->newSlice = TRUE;
283 video->currPic = NULL;
284 video->currFS = NULL;
285 video->prevRefPic = NULL;
287 video->mbNum = 0; // MC_Conceal
290 video->sliceHdr = (AVCSliceHeader*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCSliceHeader), 5/*DEFAULT_ATTR*/);
291 if (video->sliceHdr == NULL)
296 video->decPicBuf = (AVCDecPicBuffer*) avcHandle->CBAVC_Malloc(userData, sizeof(AVCDecPicBuffer), 3/*DEFAULT_ATTR*/);
297 if (video->decPicBuf == NULL)
301 memset(video->decPicBuf, 0, sizeof(AVCDecPicBuffer));
304 /* Decode SPS, allocate video->seqParams[i] and assign video->currSeqParams */
327 AVCCommonObj *video;
335 video = decvid->common;
393 AVCCommonObj *video;
401 video = decvid->common;
404 video->forbidden_bit = nal_unit[0] >> 7;
405 video->nal_ref_idc = (nal_unit[0] & 0x60) >> 5;
406 video->nal_unit_type = (AVCNalUnitType)(nal_unit[0] & 0x1F);
408 if (video->nal_unit_type != AVC_NALTYPE_PPS) /* not a PPS NAL */
417 /* 2. Decode pic_parameter_set_rbsp syntax. Allocate video->picParams[i] and assign to currPicParams */
418 status = DecodePPS(decvid, video, bitstream);
424 video->SliceGroupChangeRate = video->currPicParams->slice_group_change_rate_minus1 + 1 ;
450 AVCCommonObj *video;
459 video = decvid->common;
462 if (video->mem_mgr_ctrl_eq_5)
467 if (video->newSlice)
474 video->prev_nal_unit_type = video->nal_unit_type;
475 video->forbidden_bit = buffer[0] >> 7;
476 video->nal_ref_idc = (buffer[0] & 0x60) >> 5;
477 video->nal_unit_type = (AVCNalUnitType)(buffer[0] & 0x1F);
480 if (video->nal_unit_type == AVC_NALTYPE_AUD)
485 if (video->nal_unit_type != AVC_NALTYPE_SLICE &&
486 video->nal_unit_type != AVC_NALTYPE_IDR)
493 if (video->nal_unit_type >= 2 && video->nal_unit_type <= 4)
499 video->slice_data_partitioning = FALSE;
502 video->newSlice = FALSE;
508 status = DecodeSliceHeader(decvid, video, bitstream);
511 video->newSlice = TRUE;
515 if (video->sliceHdr->frame_num != video->prevFrameNum || (video->sliceHdr->first_mb_in_slice < (uint)video->mbNum && video->currSeqParams->constrained_set1_flag == 1))
517 video->newPic = TRUE;
518 if (video->numMBs > 0)
521 ConcealSlice(decvid, video->PicSizeInMbs - video->numMBs, video->PicSizeInMbs); // Conceal
522 video->numMBs = 0;
524 // DeblockPicture(video); // No need to deblock
528 /* set video->mem_mge_ctrl_eq_5 */
529 AVCNalUnitType temp = video->nal_unit_type;
530 video->nal_unit_type = video->prev_nal_unit_type;
531 StorePictureInDPB(avcHandle, video);
532 video->nal_unit_type = temp;
533 video->mbNum = 0; // MC_Conceal
538 if (video->nal_unit_type == AVC_NALTYPE_IDR)
540 video->prevFrameNum = 0;
541 video->PrevRefFrameNum = 0;
544 if (!video->currSeqParams->gaps_in_frame_num_value_allowed_flag)
546 /* if(sliceHdr->frame_num != (video->PrevRefFrameNum + 1)%video->MaxFrameNum) */
547 if (video->sliceHdr->frame_num != video->PrevRefFrameNum && video->sliceHdr->frame_num != (video->PrevRefFrameNum + 1) % video->MaxFrameNum)
550 video->numMBs = 0;
551 video->newPic = TRUE;
552 video->prevFrameNum++; // FIX
553 video->PrevRefFrameNum++;
554 AVCNalUnitType temp = video->nal_unit_type;
555 video->nal_unit_type = AVC_NALTYPE_SLICE; //video->prev_nal_unit_type;
556 status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
561 video->currFS->IsOutputted = 0x01;
562 video->currFS->IsReference = 3;
563 video->currFS->IsLongTerm = 0;
565 DecodePOC(video);
567 DPBInitPic(video, video->PrevRefFrameNum % video->MaxFrameNum);
568 RefListInit(video);
569 ConcealSlice(decvid, 0, video->PicSizeInMbs); // Conceal
570 video->currFS->IsOutputted |= 0x02;
574 /* set video->mem_mge_ctrl_eq_5 */
575 video->mbNum = 0; // Conceal
576 StorePictureInDPB(avcHandle, video);
577 video->nal_unit_type = temp;
584 if (video->newPic == TRUE)
586 status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
593 video->newSlice = TRUE;
600 if (video->newPic == TRUE)
602 video->numMBs = video->PicSizeInMbs;
604 if (video->nal_unit_type != AVC_NALTYPE_IDR && video->currSeqParams->gaps_in_frame_num_value_allowed_flag)
606 if (video->sliceHdr->frame_num != (video->PrevRefFrameNum + 1) % video->MaxFrameNum)
608 status = fill_frame_num_gap(avcHandle, video);
611 video->numMBs = 0;
615 status = (AVCDec_Status)DPBInitBuffer(avcHandle, video);
618 video->numMBs = 0;
630 DecodePOC(video);
632 DPBInitPic(video, video->CurrPicNum);
634 video->currPic->isReference = TRUE; // FIX
636 if (video->nal_ref_idc == 0)
638 video->currPic->isReference = FALSE;
639 video->currFS->IsOutputted |= 0x02; /* The MASK 0x02 means not needed for reference, or returned */
643 FMOInit(video);
645 if (video->currPic->isReference)
647 video->PrevRefFrameNum = video->sliceHdr->frame_num;
651 video->prevFrameNum = video->sliceHdr->frame_num;
654 video->newPic = FALSE;
658 RefListInit(video);
661 status = (AVCDec_Status)ReOrderList(video);
670 video->slice_id++; // slice
677 DeblockPicture(video);
681 /* set video->mem_mge_ctrl_eq_5 */
682 status = (AVCDec_Status)StorePictureInDPB(avcHandle, video); // CHECK check the retunr status
688 if (video->mem_mgr_ctrl_eq_5)
690 video->PrevRefFrameNum = 0;
691 video->prevFrameNum = 0;
692 video->prevPicOrderCntMsb = 0;
693 video->prevPicOrderCntLsb = video->TopFieldOrderCnt;
694 video->prevFrameNumOffset = 0;
698 video->prevPicOrderCntMsb = video->PicOrderCntMsb;
699 video->prevPicOrderCntLsb = video->sliceHdr->pic_order_cnt_lsb;
700 video->prevFrameNumOffset = video->FrameNumOffset;
725 AVCCommonObj *video;
738 video = decvid->common;
739 dpb = video->decPicBuf;
750 if (video->mem_mgr_ctrl_eq_5 == FALSE)
777 if ((dpb->fs[i]->IsOutputted & 0x01) == 0 && dpb->fs[i] != video->currFS)
796 if (count_frame < 2 && video->nal_unit_type != AVC_NALTYPE_IDR)
798 video->mem_mgr_ctrl_eq_5 = FALSE; // FIX
800 else if (count_frame < 1 && video->nal_unit_type == AVC_NALTYPE_IDR)
804 if (dpb->fs[i] == video->currFS && (dpb->fs[i]->IsOutputted & 0x01) == 0)
811 video->mem_mgr_ctrl_eq_5 = FALSE;
904 AVCCommonObj *video;
913 video = decvid->common;
914 dpb = video->decPicBuf;
928 video->mem_mgr_ctrl_eq_5 = FALSE;
929 video->newPic = TRUE;
930 video->newSlice = TRUE;
931 video->currPic = NULL;
932 video->currFS = NULL;
933 video->prevRefPic = NULL;
934 video->prevFrameNum = 0;
935 video->PrevRefFrameNum = 0;
936 video->prevFrameNumOffset = 0;
937 video->FrameNumOffset = 0;
938 video->mbNum = 0;
939 video->numMBs = 0;
957 AVCCommonObj *video;
965 video = decvid->common;
966 if (video != NULL)
968 if (video->MbToSliceGroupMap != NULL)
970 avcHandle->CBAVC_Free(userData, (int)video->MbToSliceGroupMap);
974 if (video->intra_pred_top != NULL)
976 avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top);
978 if (video->intra_pred_top_cb != NULL)
980 avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top_cb);
982 if (video->intra_pred_top_cr != NULL)
984 avcHandle->CBAVC_Free(userData, (int)video->intra_pred_top_cr);
987 if (video->mblock != NULL)
989 avcHandle->CBAVC_Free(userData, (int)video->mblock);
992 if (video->decPicBuf != NULL)
994 CleanUpDPB(avcHandle, video);
995 avcHandle->CBAVC_Free(userData, (int)video->decPicBuf);
998 if (video->sliceHdr != NULL)
1000 avcHandle->CBAVC_Free(userData, (int)video->sliceHdr);
1003 avcHandle->CBAVC_Free(userData, (int)video); /* last thing to do */