Lines Matching defs:video

25 PV_STATUS EncodeGOBHeader(VideoEncData *video, Int GOB_number, Int quant_scale, Int bs1stream);
37 PV_STATUS EncodeFrameCombinedMode(VideoEncData *video)
40 Vol *currVol = video->vol[video->currLayer];
41 Vop *currVop = video->currVop;
42 VideoEncParams *encParams = video->encParams;
48 UChar *QPMB = video->QPMB;
53 BitstreamEncVideo *bs1 = video->bitstream1;
64 video->QP_prev = currVop->quantizer;
105 video->usePrevQP = 0;
110 video->outputMB->mb_y = ind_y; /* 5/28/01 */
118 video->header_bits -= BitstreamGetPos(currVol->stream); /* Header Bits */
119 status = EncodeGOBHeader(video, slice_counter, QP, 0); //ind_y /* Encode GOB Header */
120 video->header_bits += BitstreamGetPos(currVol->stream); /* Header Bits */
127 video->outputMB->mb_x = ind_x; /* 5/28/01 */
128 video->mbnum = mbnum;
132 video->sliceNo[mbnum] = curr_slice_counter; /* Update MB slice number */
134 video->sliceNo[mbnum] = slice_counter;
139 getMotionCompensatedMB(video, ind_x, ind_y, offset);
145 video->sliceNo[mbnum] = slice_counter; /* Update MB slice number*/
146 video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
147 video->QP_prev = currVop->quantizer;
148 status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 0);
149 video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
152 video->usePrevQP = 0;
159 status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
165 (*MBVlcEncode)(video, ncoefblck, (void*)BlockCodeCoeff);
171 /* Assemble_Packet(video) */
180 video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
222 video->header_bits += BitstreamShortHeaderByteAlignStuffing(currVol->stream); /* Byte Align */
232 video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1);/* Byte Align */
242 video->header_bits += BitstreamMpeg4ByteAlignStuffing(currVol->stream); /* Byte Align */
262 PV_STATUS EncodeSliceCombinedMode(VideoEncData *video)
265 Vol *currVol = video->vol[video->currLayer];
266 Vop *currVop = video->currVop;
268 UChar *Mode = video->headerInfo.Mode;
269 VideoEncParams *encParams = video->encParams;
273 // rateControl *rc = encParams->rc[video->currLayer];
274 UChar *QPMB = video->QPMB;
276 Int ind_x = video->outputMB->mb_x, ind_y = video->outputMB->mb_y;
277 Int offset = video->offset; /* get current MB location */
278 Int mbnum = video->mbnum, slice_counter = video->sliceNo[mbnum]; /* get current MB location */
284 BitstreamEncVideo *bs1 = video->bitstream1;
296 video->QP_prev = 31;
301 if (video->end_of_buf) /* left-over from previous run */
307 video->end_of_buf = 0;
315 QPMB[0] = video->QP_prev = QP = currVop->quantizer;
316 video->usePrevQP = 0;
323 if (mbnum > 0) video->QP_prev = QPMB[mbnum-1];
372 video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
373 status = EncodeGOBHeader(video, slice_counter, QP, 1); //ind_y /* Encode GOB Header */
374 video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
392 video->outputMB->mb_y = ind_y; /* 5/28/01, do not remove */
397 video->outputMB->mb_x = ind_x; /* 5/28/01, do not remove */
398 video->mbnum = mbnum;
399 video->sliceNo[mbnum] = slice_counter; /* Update MB slice number */
404 getMotionCompensatedMB(video, ind_x, ind_y, offset);
412 video->sliceNo[mbnum] = slice_counter; /* Update MB slice number*/
413 video->QP_prev = currVop->quantizer; /* store QP */
415 status = EncodeVideoPacketHeader(video, mbnum, video->QP_prev, 1);
417 video->header_bits += numHeaderBits; /* Header Bits */
419 video->usePrevQP = 0;
427 status = (*CodeMB)(video, &fastDCTfunction, (offset << 5) + QP, ncoefblck);
441 CBP = video->headerInfo.CBP[mbnum];
444 M4VENC_MEMCPY(outputMB[k], video->outputMB->block[k], sizeof(Short) << 6);
449 (*MBVlcEncode)(video, ncoefblck, (void*)BlockCodeCoeff);
455 /* Assemble_Packet(video) */
471 video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte align Packet */
477 video->end_of_buf = 1;
486 if (mbnum < nTotalMB || video->end_of_buf) /* return here */
488 video->mbnum = mbnum;
489 video->sliceNo[mbnum] = slice_counter;
490 video->offset = offset;
492 video->headerInfo.CBP[mbnum] = CBP;
496 M4VENC_MEMCPY(video->outputMB->block[k], outputMB[k], sizeof(Short) << 6);
519 video->outputMB->mb_x++;
520 if (video->outputMB->mb_x >= currVol->nMBPerRow)
522 video->outputMB->mb_x = 0;
523 video->outputMB->mb_y++;
526 video->mbnum = mbnum;
527 video->offset = offset;
528 video->sliceNo[mbnum] = slice_counter;
545 video->header_bits += BitstreamShortHeaderByteAlignStuffing(bs1);
547 //video->header_bits+=BitstreamShortHeaderByteAlignStuffing(bs1);
556 video->end_of_buf = 1;
571 // video->end_of_buf = 1;
577 video->end_of_buf = 1;
584 video->outputMB->mb_x = 0;
585 video->outputMB->mb_y++;
586 video->mbnum = mbnum;
587 video->offset = offset;
588 video->sliceNo[mbnum] = slice_counter;
598 video->header_bits -= BitstreamGetPos(bs1); /* Header Bits */
599 status = EncodeGOBHeader(video, slice_counter, QP, 1); /* Encode GOB Header */
600 video->header_bits += BitstreamGetPos(bs1); /* Header Bits */
615 video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1);/* Byte Align */
620 video->end_of_buf = 1;
630 video->header_bits += BitstreamMpeg4ByteAlignStuffing(bs1); /* Byte Align */
634 video->end_of_buf = 1;
647 video->header_bits += BitstreamShortHeaderByteAlignStuffing(bs1);
651 video->end_of_buf = 1;
656 video->end_of_buf = 0;
661 video->mbnum = mbnum;
663 video->sliceNo[mbnum] = slice_counter;
664 video->offset = offset;
681 PV_STATUS EncodeGOBHeader(VideoEncData *video, Int GOB_number, Int quant_scale, Int bs1stream)
684 BitstreamEncVideo *stream = (bs1stream ? video->bitstream1 : video->vol[video->currLayer]->stream);
688 status = BitstreamPutBits(stream, 2, video->currVop->gobFrameID); /* gob_frame_id */