亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? slice.c

?? AVS編解碼是學習AVS程序開發的入門資料,可以幫助初學者獲得很多的收獲.
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*****************************************************************************
* COPYRIGHT AND WARRANTY INFORMATION
*
* Copyright 2003, Advanced Audio Video Coding Standard, Part II
*
* DISCLAIMER OF WARRANTY
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations under
* the License.
*                     
* THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE AVS PATENT POLICY.
* The AVS Working Group doesn't represent or warrant that the programs
* furnished here under are free of infringement of any third-party patents.
* Commercial implementations of AVS, including shareware, may be
* subject to royalty fees to patent holders. Information regarding
* the AVS patent policy for standardization procedure is available at 
* AVS Web site http://www.avs.org.cn. Patent Licensing is outside
* of AVS Working Group.
*
* The Original Code is Reference Software for China National Standard 
* GB/T 20090.2-2006 (short for AVS-P2 or AVS Video) at version RM52J.
*
* The Initial Developer of the Original Code is Video subgroup of AVS
* Workinggroup (Audio and Video coding Standard Working Group of China).
* Contributors:   Guoping Li,    Siwei Ma,    Jian Lou,    Qiang Wang , 
*   Jianwen Chen,Haiwu Zhao,  Xiaozhen Zheng, Junhao Zheng, Zhiming Wang
* 
******************************************************************************
*/



/*
*************************************************************************************
* File name: 
* Function: 
*
*************************************************************************************
*/

#include "contributors.h"

#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/timeb.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

#include "global.h"
#include "header.h"
#include "bitstream.h"
#include "vlc.h"
#include "image.h"
#include "rdopt_coding_state.h"
#include "loopfilter.h"

/*
*************************************************************************
* Function:This function terminates a slice
* Input:
* Output:
* Return: 0 if OK,                                                         \n
      1 in case of error
* Attention:                                                  by jlzheng
*************************************************************************
*/

int start_slice()
{
  Bitstream *currStream;
    
  currStream = currBitStream;

   if(((img->picture_structure && img->current_mb_nr!=0))||((!img->picture_structure)&&(img->current_mb_nr_fld!=0)))
     Demulate(currStream,current_slice_bytepos);                  //qhg 20060327  for de-emulation

  if (currStream->bits_to_go!=8) //   hzjia 2004-08-20 
  {
	  
	  currStream->byte_buf <<= currStream->bits_to_go;
	  currStream->byte_buf |= ( 1 << (currStream->bits_to_go - 1) );
	  
	  currStream->streamBuffer[currStream->byte_pos++] = currStream->byte_buf;
	  currStream->bits_to_go = 8;
	  currStream->byte_buf = 0;
  } 
   else		// cjw 20060321 
  {
	  currStream->streamBuffer[currStream->byte_pos++] = 0x80;
	  currStream->bits_to_go = 8;
	  currStream->byte_buf = 0; 
  }
  
   //qhg 20060327 for de-emulation 
  current_slice_bytepos=currStream->byte_pos;  

  return 0;   
}

/*
*************************************************************************
* Function:This function terminates a picture
* Input:
* Output:
* Return: 0 if OK,                                                         \n
      1 in case of error
* Attention:
*************************************************************************
*/

int terminate_picture()
{
  Bitstream *currStream;
    
  currStream = currBitStream;
 
//////////////////////////////////////////////////////////////////////////
    Demulate(currStream,current_slice_bytepos);                    //qhg 20060327 
//////////////////////////////////////////////////////////////////////////


  //---deleted by Yulj 2004.07.16
	// '10..' should be filled even if currStream is bytealign. 
  //if (currStream->bits_to_go==8)  
  //  return 0;
   
  currStream->byte_buf <<= currStream->bits_to_go;
  currStream->byte_buf |= (1 << (currStream->bits_to_go - 1) );    // Yulj 2004.07.16
  
  currStream->streamBuffer[currStream->byte_pos++] = currStream->byte_buf;
  currStream->bits_to_go = 8;
  currStream->byte_buf = 0;
  
  return 0;   
}

/*
*************************************************************************
* Function:Encodes one slice
* Input:
* Output:
* Return: the number of coded MBs in the SLice 
* Attention:                                    
*************************************************************************
*/
void picture_data(Picture *pic)
{
  Boolean end_of_picture = FALSE;
  int CurrentMbNumber=0;
  int MBRowSize = img->width / MB_BLOCK_SIZE;         // jlzheng 7.1
	int slice_nr = 0;
	int slice_qp = img->qp;
	int len;
	
        
    bot_field_mb_nr = -1;	//Xiaozhen Zheng, HiSilicon, 20070327
	while (end_of_picture == FALSE) // loop over macroblocks
	{
		set_MB_parameters (CurrentMbNumber);
		
		if (input->slice_row_nr && (img->current_mb_nr ==0  
			||(img->current_mb_nr>0 && img->mb_data[img->current_mb_nr].slice_nr != img->mb_data[img->current_mb_nr-1].slice_nr)))
		{
			   // slice header start     jlzheng 7.1
			   start_slice (); 
			   img->current_slice_qp = img->qp;
			   img->current_slice_start_mb = img->current_mb_nr;
               len = SliceHeader(slice_nr, slice_qp);  
			   stat->bit_slice += len;  
			   slice_nr++; 
			   // slcie header end
		}
		   
		   start_macroblock ();
		   encode_one_macroblock ();
		   write_one_macroblock (1);
		   terminate_macroblock (&end_of_picture);
		   proceed2nextMacroblock ();
		   CurrentMbNumber++;
		   
	}
	
	terminate_picture ();
	
	DeblockFrame (img, imgY, imgUV);

}


void top_field(Picture *pic)
{
	Boolean end_of_picture = FALSE;
	int CurrentMbNumber=0;
	int MBRowSize = img->width / MB_BLOCK_SIZE;
	int slice_nr =0;
	int slice_qp = img->qp;
	int len;

	img->top_bot = 0;  // Yulj 2004.07.20
	bot_field_mb_nr = -1;	//Xiaozhen Zheng, HiSilicon, 20070327
	while (end_of_picture == FALSE) // loop over macroblocks
	{
		set_MB_parameters (CurrentMbNumber);
		
		img->current_mb_nr_fld = img->current_mb_nr; //qhg 20060327 for de-emulation
							     //img->current_mb_nr_fld is used in start_slice()
		if (input->slice_row_nr && (img->current_mb_nr ==0  
			||(img->current_mb_nr>0 && img->mb_data[img->current_mb_nr].slice_nr != img->mb_data[img->current_mb_nr-1].slice_nr)))
		{
			// slice header start jlzheng 7.1
			start_slice ();  
			img->current_slice_qp = img->qp;
			img->current_slice_start_mb = img->current_mb_nr;
			len = SliceHeader(slice_nr, slice_qp);
			stat->bit_slice += len;
			slice_nr++;
			// slice header end
		}
		
		//img->current_mb_nr_fld = img->current_mb_nr;  //delete by qhg 20060327 for de-emulation
		start_macroblock ();
		encode_one_macroblock ();
		write_one_macroblock (1);
		terminate_macroblock (&end_of_picture);
		proceed2nextMacroblock ();
		CurrentMbNumber++;
	}
	
	DeblockFrame (img, imgY, imgUV);

	bot_field_mb_nr = img->current_mb_nr;	// record the last mb index in the top field,	Xiaozhen Zheng HiSilicon, 20070327

	//rate control
	pic->bits_per_picture = 8 * (currBitStream->byte_pos);
}

void bot_field(Picture *pic)
{
	Boolean end_of_picture = FALSE;
	int CurrentMbNumber=0;
	int MBRowSize = img->width / MB_BLOCK_SIZE;
	int slice_nr =0;
	int slice_qp = img->qp;
	int len;
	
	img->top_bot = 1; //Yulj 2004.07.20
	while (end_of_picture == FALSE) // loop over macroblocks
	{
		set_MB_parameters (CurrentMbNumber);
		if (input->slice_row_nr && (img->current_mb_nr ==0  
			||(img->current_mb_nr>0 && img->mb_data[img->current_mb_nr].slice_nr != img->mb_data[img->current_mb_nr-1].slice_nr)))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品91久久久中77777| 不卡欧美aaaaa| 日韩**一区毛片| 亚洲成人在线免费| 亚洲香蕉伊在人在线观| 亚洲综合久久av| 亚洲成人免费在线| 麻豆一区二区三区| 久久疯狂做爰流白浆xx| 精品无人区卡一卡二卡三乱码免费卡| 蜜臀精品久久久久久蜜臀| 日韩电影一区二区三区| 精品一区二区综合| 成人小视频在线| 91国在线观看| 欧美精品少妇一区二区三区| 欧美一级搡bbbb搡bbbb| 久久日一线二线三线suv| 国产精品私人影院| 亚洲精品国产精华液| 天堂精品中文字幕在线| 久久66热re国产| 成人的网站免费观看| 91搞黄在线观看| 欧美xxxxxxxx| 亚洲私人影院在线观看| 日本不卡高清视频| 波波电影院一区二区三区| 91美女视频网站| 91精品国产综合久久婷婷香蕉| 欧美大白屁股肥臀xxxxxx| 国产人成一区二区三区影院| 亚洲人被黑人高潮完整版| 午夜精品久久久久| 久久se这里有精品| 99re成人精品视频| 8v天堂国产在线一区二区| 欧美国产成人在线| 视频一区二区三区中文字幕| 风间由美一区二区av101| 精品视频一区二区三区免费| 久久久久久久久久久久久久久99| 亚洲日本va午夜在线影院| 麻豆精品国产传媒mv男同| 91丨九色丨国产丨porny| 精品国产一区久久| 午夜精品福利一区二区三区av| 成人午夜精品在线| 久久久午夜精品| 青青国产91久久久久久 | 亚洲成av人片一区二区梦乃 | 国产精品全国免费观看高清 | 欧美日韩精品免费| 亚洲婷婷在线视频| 国产一区二区三区综合| 欧美日韩三级视频| 亚洲嫩草精品久久| 成人午夜在线免费| 国产亚洲成aⅴ人片在线观看| 天天综合网天天综合色| 91美女在线观看| 亚洲视频中文字幕| www.日韩精品| 中文字幕欧美激情一区| 国产一区二区三区免费在线观看| 欧美性一二三区| 亚洲精品大片www| 99精品久久久久久| 国产精品久久综合| 成人a免费在线看| 亚洲欧洲另类国产综合| 国产+成+人+亚洲欧洲自线| 久久女同性恋中文字幕| 九九**精品视频免费播放| 日韩一级片在线播放| 日本中文字幕一区二区视频| 在线播放一区二区三区| 丝袜诱惑亚洲看片 | 国产一区在线观看视频| 日韩精品在线网站| 国产激情一区二区三区| 国产日本欧洲亚洲| 91丨porny丨最新| 亚洲一本大道在线| 欧美一区二区免费观在线| 日本亚洲最大的色成网站www| 欧美一级视频精品观看| 国产最新精品免费| 国产精品福利在线播放| 色综合久久66| 天天色综合天天| 久久久久久99久久久精品网站| 国产精品一二三四| 自拍视频在线观看一区二区| 欧美综合欧美视频| 日本特黄久久久高潮| 亚洲精品一区二区三区蜜桃下载| 国产成人精品午夜视频免费| 中文字幕综合网| 日韩一区二区不卡| 成人av免费在线播放| 亚洲韩国精品一区| 精品日产卡一卡二卡麻豆| 成人高清免费观看| 亚洲第一福利一区| 中文字幕乱码一区二区免费| 欧美性三三影院| 国产精品自拍网站| 丝袜脚交一区二区| 国产精品久久久久影院老司| 欧美日韩国产精品成人| 国产麻豆精品在线观看| 午夜精品久久久久久久99水蜜桃 | 夜夜揉揉日日人人青青一国产精品| 欧美欧美欧美欧美首页| 高清久久久久久| 亚洲成av人影院| 亚洲视频一区二区免费在线观看| 欧美一区二区三区在线观看| 99re66热这里只有精品3直播| 久久国产麻豆精品| 亚洲大片免费看| 亚洲视频小说图片| 久久久精品欧美丰满| 69av一区二区三区| 91福利精品视频| av在线综合网| 国产传媒一区在线| 激情偷乱视频一区二区三区| 亚洲三级在线免费观看| 国产日韩精品一区二区三区| 欧美一二三四在线| 欧美日韩国产一级| 日本大香伊一区二区三区| 国产jizzjizz一区二区| 久久精品国产亚洲a| 日本不卡一区二区三区高清视频| 亚洲免费在线电影| 国产精品国产精品国产专区不片| 久久影院午夜片一区| 日韩一区二区三区在线| 欧美二区三区的天堂| 欧美专区日韩专区| 色婷婷av一区二区三区大白胸 | 日韩一区二区三区观看| 欧美在线免费视屏| 欧美特级限制片免费在线观看| av一本久道久久综合久久鬼色| 狠狠色狠狠色合久久伊人| 久久精品噜噜噜成人88aⅴ| 老汉av免费一区二区三区| 毛片不卡一区二区| 久久 天天综合| 国产精品一区在线观看你懂的| 精彩视频一区二区三区| 精品一区二区日韩| 国产一区二区精品久久| 国产乱人伦偷精品视频不卡| 国产91在线观看| 国产激情一区二区三区桃花岛亚洲| 激情小说欧美图片| 国产一区二区三区av电影| 国产高清无密码一区二区三区| 国产一区在线不卡| 99re在线视频这里只有精品| 在线观看国产91| 欧美一区二区三区男人的天堂| 日韩精品一区二| 国产欧美一区二区精品久导航| 国产精品污www在线观看| 中文字幕一区二区日韩精品绯色| 亚洲男同性视频| 美腿丝袜一区二区三区| 国产成人自拍网| 97aⅴ精品视频一二三区| 欧美羞羞免费网站| 欧美成人综合网站| 亚洲少妇30p| 蜜臀av一级做a爰片久久| 国产91精品免费| 欧美性xxxxx极品少妇| 精品国产一区a| 亚洲色图.com| 精品一区二区久久| 色综合久久综合中文综合网| 欧美精品一卡两卡| 亚洲国产精品精华液2区45| 亚洲精品五月天| 成人妖精视频yjsp地址| 94色蜜桃网一区二区三区| 欧美吞精做爰啪啪高潮| 久久女同性恋中文字幕| 日韩美女久久久| 成人国产精品免费网站| 成人av资源下载| 欧美在线观看视频一区二区三区| 成人免费视频caoporn| 欧美日本韩国一区| 亚洲成人免费视频| 精品国产91久久久久久久妲己|