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

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

?? output.c

?? 此code含H.264解碼需要的 lib和 src
?? C
?? 第 1 頁 / 共 2 頁
字號:

/*!
 ************************************************************************
 * \file output.c
 *
 * \brief
 *    Output an image and Trance support
 *
 * \author
 *    Main contributors (see contributors.h for copyright, address and affiliation details)
 *    - Karsten Suehring               <suehring@hhi.de>
 ************************************************************************
 */

//#include "contributors.h"

#include <stdlib.h>
#include <assert.h>
#include <string.h>

#if defined(WIN32) || defined(UNDER_CE)
//#include <io.h>
#else
#include <unistd.h>
#endif

#include "global.h"
#include "mbuffer.h"
#include "image.h"
#include "memalloc.h"
#include "sei.h"

// FrameStore* out_buffer;

//StorablePicture *pending_output = NULL;
//int              pending_output_state = FRAME;
int recovery_flag = 0;

extern int non_conforming_stream;

void write_out_picture(StorablePicture *p/*, int p_out*/);


/*!
 ************************************************************************
 * \brief
 *      checks if the System is big- or little-endian
 * \return
 *      0, little-endian (e.g. Intel architectures)
 *      1, big-endian (e.g. SPARC, MIPS, PowerPC)
 ************************************************************************
 */
int testEndian()
{
  short s;
  byte *p;

  p=(byte*)&s;

  s=1;

  return (*p==0);
}


/*!
 ************************************************************************
 * \brief
 *    Convert image plane to temporary buffer for file writing
 * \param imgX
 *    Pointer to image plane
 * \param buf
 *    Buffer for file output
 * \param size_x
 *    horizontal size
 * \param size_y
 *    vertical size
 * \param symbol_size_in_bytes
 *    number of bytes used per pel
 * \param crop_left
 *    pixels to crop from left
 * \param crop_right
 *    pixels to crop from right
 * \param crop_top
 *    pixels to crop from top
 * \param crop_bottom
 *    pixels to crop from bottom
 ************************************************************************
 */
//void img2buf (imgpel** imgX, unsigned char* buf, int size_x, int size_y, int symbol_size_in_bytes, int crop_left, int crop_right, int crop_top, int crop_bottom)
//{
//  int i,j;
//
//  int twidth  = size_x - crop_left - crop_right;
//  int theight = size_y - crop_top - crop_bottom;
//
//  int size = 0;
//
//  unsigned char  ui8;
//  unsigned short tmp16, ui16;
//  unsigned long  tmp32, ui32;
//
//  if (( sizeof(char) == sizeof (imgpel)) && ( sizeof(char) == symbol_size_in_bytes))
//  {
//    // imgpel == pixel_in_file == 1 byte -> simple copy
//    buf += crop_left;
//    for(i = 0; i < theight; i++) 
//    {
//      memcpy(buf, &(imgX[i + crop_top][crop_left]), twidth);
//      buf += twidth;
//    }
//  }
//  else
//  {
//    // sizeof (imgpel) > sizeof(char)
//    if (testEndian())
//    {
//      // big endian
//      switch (symbol_size_in_bytes)
//      {
//      case 1:
//        {
//          for(i=crop_top;i<size_y-crop_bottom;i++)
//            for(j=crop_left;j<size_x-crop_right;j++)
//            {
//              ui8 = (unsigned char) (imgX[i][j]);
//              buf[(j-crop_left+((i-crop_top)*(twidth)))] = ui8;
//            }
//          break;
//        }
//      case 2:
//        {
//          for(i=crop_top;i<size_y-crop_bottom;i++)
//            for(j=crop_left;j<size_x-crop_right;j++)
//            {
//              tmp16 = (unsigned short) (imgX[i][j]);
//              ui16  = (tmp16 >> 8) | ((tmp16&0xFF)<<8);
//              memcpy(buf+((j-crop_left+((i-crop_top)*(twidth)))*2),&(ui16), 2);
//            }
//          break;
//        }
//      case 4:
//        {
//          for(i=crop_top;i<size_y-crop_bottom;i++)
//            for(j=crop_left;j<size_x-crop_right;j++)
//            {
//              tmp32 = (unsigned long) (imgX[i][j]);
//              ui32  = ((tmp32&0xFF00)<<8) | ((tmp32&0xFF)<<24) | ((tmp32&0xFF0000)>>8) | ((tmp32&0xFF000000)>>24);
//              memcpy(buf+((j-crop_left+((i-crop_top)*(twidth)))*4),&(ui32), 4);
//            }
//          break;
//        }
//      default:
//        {
//           error ("writing only to formats of 8, 16 or 32 bit allowed on big endian architecture", 500);
//           break;
//        }
//      }
//
//    }
//    else
//    {
//      // little endian
//      if (sizeof (imgpel) < symbol_size_in_bytes)
//      {
//        // this should not happen. we should not have smaller imgpel than our source material.
//        size = sizeof (imgpel);
//        // clear buffer
//        memset (buf, 0, (twidth*theight*symbol_size_in_bytes));
//      }
//      else
//      {
//        size = symbol_size_in_bytes;
//      }
//
//      if ((crop_top || crop_bottom || crop_left || crop_right) || (size != 1))
//      {
//        for(i=crop_top;i<size_y-crop_bottom;i++)
//        {
//          int ipos = (i-crop_top)*(twidth);
//          for(j=crop_left;j<size_x-crop_right;j++)
//          {
//            memcpy(buf+((j-crop_left+(ipos))*symbol_size_in_bytes),&(imgX[i][j]), size);
//          }
//        }
//      }
//      else
//      {
//        imgpel *cur_pixel = &(imgX[0][0]);;
//        for(i = 0; i < size_y * size_x; i++)
//        {          
//          *(buf++)=(char) *(cur_pixel++);
//        }
//      }
//    }
//  }
//}


//#ifdef PAIR_FIELDS_IN_OUTPUT
//
//void clear_picture(StorablePicture *p);
//
///*!
// ************************************************************************
// * \brief
// *    output the pending frame buffer
// * \param p_out
// *    Output file
// ************************************************************************
// */
//void flush_pending_output(int p_out)
//{
//  if (pending_output_state!=FRAME)
//  {
//    write_out_picture(pending_output, p_out);
//  }
//
//  if (pending_output->imgY)
//  {
//    free_mem2Dpel (pending_output->imgY);
//    pending_output->imgY=NULL;
//  }
//  if (pending_output->imgUV)
//  {
//    free_mem3Dpel (pending_output->imgUV, 2);
//    pending_output->imgUV=NULL;
//  }
//
//  pending_output_state = FRAME;
//}
//
//
///*!
// ************************************************************************
// * \brief
// *    Writes out a storable picture
// *    If the picture is a field, the output buffers the picture and tries
// *    to pair it with the next field.
// * \param p
// *    Picture to be written
// * \param p_out
// *    Output file
// ************************************************************************
// */
//void write_picture(StorablePicture *p, int p_out, int real_structure)
//{
//   int i, add;
//
//  if (real_structure==FRAME)
//  {
//    flush_pending_output(p_out);
//    write_out_picture(p, p_out);
//    return;
//  }
//  if (real_structure==pending_output_state)
//  {
//    flush_pending_output(p_out);
//    write_picture(p, p_out, real_structure);
//    return;
//  }
//
//  if (pending_output_state == FRAME)
//  {
//    pending_output->size_x = p->size_x;
//    pending_output->size_y = p->size_y;
//    pending_output->size_x_cr = p->size_x_cr;
//    pending_output->size_y_cr = p->size_y_cr;
//    pending_output->chroma_format_idc = p->chroma_format_idc;
//
//    pending_output->frame_mbs_only_flag = p->frame_mbs_only_flag;
//    pending_output->frame_cropping_flag = p->frame_cropping_flag;
//    if (pending_output->frame_cropping_flag)
//    {
//      pending_output->frame_cropping_rect_left_offset = p->frame_cropping_rect_left_offset;
//      pending_output->frame_cropping_rect_right_offset = p->frame_cropping_rect_right_offset;
//      pending_output->frame_cropping_rect_top_offset = p->frame_cropping_rect_top_offset;
//      pending_output->frame_cropping_rect_bottom_offset = p->frame_cropping_rect_bottom_offset;
//    }
//
//    get_mem2Dpel (&(pending_output->imgY), pending_output->size_y, pending_output->size_x);
//    get_mem3Dpel (&(pending_output->imgUV), 2, pending_output->size_y_cr, pending_output->size_x_cr);
//
//    clear_picture(pending_output);
//
//    // copy first field
//    if (real_structure == TOP_FIELD)
//    {
//      add = 0;
//    }
//    else
//    {
//      add = 1;
//    }
//
//    for (i=0; i<pending_output->size_y; i+=2)
//    {
//      memcpy(pending_output->imgY[(i+add)], p->imgY[(i+add)], p->size_x * sizeof(imgpel));
//    }
//    for (i=0; i<pending_output->size_y_cr; i+=2)
//    {
//      memcpy(pending_output->imgUV[0][(i+add)], p->imgUV[0][(i+add)], p->size_x_cr * sizeof(imgpel));
//      memcpy(pending_output->imgUV[1][(i+add)], p->imgUV[1][(i+add)], p->size_x_cr * sizeof(imgpel));
//    }
//    pending_output_state = real_structure;
//  }
//  else
//  {
//    if (  (pending_output->size_x!=p->size_x) || (pending_output->size_y!= p->size_y)
//       || (pending_output->frame_mbs_only_flag != p->frame_mbs_only_flag)
//       || (pending_output->frame_cropping_flag != p->frame_cropping_flag)
//       || ( pending_output->frame_cropping_flag &&
//            (  (pending_output->frame_cropping_rect_left_offset   != p->frame_cropping_rect_left_offset)
//             ||(pending_output->frame_cropping_rect_right_offset  != p->frame_cropping_rect_right_offset)
//             ||(pending_output->frame_cropping_rect_top_offset    != p->frame_cropping_rect_top_offset)
//             ||(pending_output->frame_cropping_rect_bottom_offset != p->frame_cropping_rect_bottom_offset)
//            )
//          )
//       )
//    {
//      flush_pending_output(p_out);
//      write_picture (p, p_out, real_structure);
//      return;
//    }
//    // copy second field
//    if (real_structure == TOP_FIELD)
//    {
//      add = 0;
//    }
//    else
//    {
//      add = 1;
//    }
//
//    for (i=0; i<pending_output->size_y; i+=2)
//    {
//      memcpy(pending_output->imgY[(i+add)], p->imgY[(i+add)], p->size_x * sizeof(imgpel));
//    }
//    for (i=0; i<pending_output->size_y_cr; i+=2)
//    {
//      memcpy(pending_output->imgUV[0][(i+add)], p->imgUV[0][(i+add)], p->size_x_cr * sizeof(imgpel));
//      memcpy(pending_output->imgUV[1][(i+add)], p->imgUV[1][(i+add)], p->size_x_cr * sizeof(imgpel));
//    }
//
//    flush_pending_output(p_out);
//  }
//}
//
//#else

extern FILE *fpic_mem;

/*!
 ************************************************************************
 * \brief
 *    Writes out a storable picture without doing any output modifications
 * \param p
 *    Picture to be written
 * \param p_out
 *    Output file
 * \param real_structure
 *    real picture structure
 ************************************************************************
 */
void write_picture(StorablePicture *p, /*int p_out,*/ int real_structure)
{
//  write_out_picture(p, p_out);
    memory_operation[memory_operation_size].action = DISPLAY;
    memory_operation[memory_operation_size].memory_start = p->pic_mem_idx;
	memory_operation[memory_operation_size].frame_field = real_structure == FRAME ? IS_FRAME :IS_FIELD;
    memory_operation_size++;

	if (real_structure == FRAME) 
	{
		//fprintf(fpic_mem, "display mem[%d,%d] for frame, POC(%d,%d)\n", p->pic_mem_idx, p->pic_mem_idx+1, p->top_poc, p->bottom_poc);	
	}
	else
	{
		//fprintf(fpic_mem, "display mem[%d] for field, POC(%d)\n", p->pic_mem_idx, p->structure == TOP_FIELD ? p->top_poc : p->bottom_poc);

	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久中文字幕| 国产一区亚洲一区| 色婷婷国产精品| 一区二区三区日本| 色哟哟亚洲精品| 亚洲午夜国产一区99re久久| 欧美亚洲综合久久| 首页国产丝袜综合| 亚洲精品一区二区三区香蕉 | 亚洲欧洲日产国码二区| 99久久99久久久精品齐齐| **欧美大码日韩| 精品污污网站免费看| 六月丁香综合在线视频| 国产日产欧美一区| 在线视频你懂得一区二区三区| 亚洲高清免费在线| 欧美精品一区二区三区蜜桃视频| 国产成人高清视频| 一区二区国产视频| 欧美不卡激情三级在线观看| 成人午夜电影网站| 亚洲国产日产av| 26uuu亚洲婷婷狠狠天堂| 91香蕉视频黄| 久久精品噜噜噜成人88aⅴ| 26uuu亚洲| 日本伦理一区二区| 激情偷乱视频一区二区三区| 国产精品久久久久久户外露出| 欧美综合一区二区三区| 国内外精品视频| 一区二区三区日韩欧美精品| 精品国产三级a在线观看| 成人久久视频在线观看| 青青草视频一区| 亚洲欧洲成人av每日更新| 91精品国产综合久久久久久| 91精品国产91久久综合桃花 | 日韩一区二区三区电影在线观看 | 中文欧美字幕免费| 欧美裸体一区二区三区| www.亚洲在线| 久久精品国产成人一区二区三区 | 日韩欧美一区二区在线视频| 成人爱爱电影网址| 久久99精品久久久久久动态图| 国产精品理论片| 精品国产一区二区精华| 欧美日韩亚洲综合一区 | 色偷偷久久一区二区三区| 精品在线一区二区三区| 亚洲成a人v欧美综合天堂 | 91同城在线观看| 国产成人精品三级| 捆绑调教一区二区三区| 亚洲大片免费看| 综合色天天鬼久久鬼色| 久久久国产综合精品女国产盗摄| 9191久久久久久久久久久| 91福利视频在线| 99国产精品国产精品毛片| 国产在线国偷精品产拍免费yy| 日韩影院免费视频| 偷拍自拍另类欧美| 亚洲不卡一区二区三区| 亚洲黄色在线视频| 国产精品国产三级国产aⅴ原创| 26uuu成人网一区二区三区| 日韩欧美亚洲国产精品字幕久久久 | 国产精品18久久久久久久久 | 国产一区二区三区综合| 精品一区二区三区香蕉蜜桃| 日本欧美在线看| 日韩1区2区3区| 日韩精品一级中文字幕精品视频免费观看 | 欧美日韩一区二区三区视频| 色婷婷综合在线| 色播五月激情综合网| 91麻豆免费在线观看| 91女神在线视频| 色婷婷综合久色| 欧美视频在线观看一区二区| 91福利社在线观看| 欧美午夜一区二区| 欧美精品v日韩精品v韩国精品v| 欧美自拍丝袜亚洲| 在线区一区二视频| 91.成人天堂一区| 日韩欧美黄色影院| 久久久www成人免费无遮挡大片| 久久日韩粉嫩一区二区三区| 国产欧美日韩精品一区| 国产精品久久久久一区| 亚洲精品日韩综合观看成人91| 一区二区三区欧美久久| 天天爽夜夜爽夜夜爽精品视频| 日韩精品电影在线观看| 国产一区二区三区在线观看免费视频| 国产成人免费av在线| 91蜜桃免费观看视频| 欧美男人的天堂一二区| 2021国产精品久久精品| 国产精品色婷婷久久58| 亚洲一二三四区| 久久精品国产精品亚洲红杏| 国产成人a级片| 在线观看一区日韩| 日韩三级伦理片妻子的秘密按摩| 久久天天做天天爱综合色| 中文字幕日韩欧美一区二区三区| 亚洲国产一区在线观看| 久久精品国产99国产精品| 成人午夜碰碰视频| 欧美日韩成人综合| 国产婷婷色一区二区三区四区| 亚洲视频精选在线| 美洲天堂一区二卡三卡四卡视频| 成人精品视频一区| 欧美日韩美少妇| 日本一区二区综合亚洲| 午夜精品福利一区二区三区av| 国产综合一区二区| 欧美性猛交一区二区三区精品| 久久综合网色—综合色88| 一区二区三区国产精品| 久久99精品久久久久久动态图 | 亚洲精品第一国产综合野| 久久99精品视频| 欧美在线制服丝袜| 中文字幕不卡三区| 99精品视频在线观看| 精品少妇一区二区三区免费观看| 亚洲人成人一区二区在线观看| 久久国产视频网| 欧美性猛片aaaaaaa做受| 国产日韩一级二级三级| 奇米一区二区三区av| 91九色最新地址| 中文字幕精品一区二区精品绿巨人| 日韩二区三区四区| 91国产精品成人| 中文字幕在线不卡视频| 国内精品伊人久久久久av影院| 欧美色电影在线| 亚洲视频一区二区在线| 国产成人免费av在线| 精品成人一区二区| 免费在线一区观看| 欧美人与性动xxxx| 亚洲与欧洲av电影| 99精品视频在线观看免费| 国产三级精品三级在线专区| 精品在线一区二区三区| 日韩视频免费观看高清完整版在线观看| 亚洲女同一区二区| jlzzjlzz亚洲女人18| 国产欧美精品一区| 国产丶欧美丶日本不卡视频| 欧美第一区第二区| 青娱乐精品在线视频| 91精品国产色综合久久不卡电影| 一区二区三区国产精华| 色婷婷av一区二区| 一区二区欧美精品| 在线国产亚洲欧美| 亚洲综合一区二区精品导航| 色综合视频在线观看| 亚洲欧洲精品一区二区精品久久久 | 国产不卡一区视频| 国产视频一区在线播放| 国产精品白丝jk白祙喷水网站| 久久久夜色精品亚洲| 国产成人午夜99999| 久久精品人人做人人爽97| 国产麻豆精品在线| 国产日韩欧美综合一区| 成人免费av在线| 亚洲欧美日韩在线| 在线一区二区视频| 天堂久久久久va久久久久| 欧美一级片在线看| 久久激情五月婷婷| 国产欧美精品在线观看| 成人av综合在线| 亚洲蜜臀av乱码久久精品| 欧美三级乱人伦电影| 日韩av一级电影| 久久久三级国产网站| av电影在线观看一区| 亚洲精品第一国产综合野| 欧美日韩精品一区二区在线播放| 日本少妇一区二区| 久久久久久久精| 色香色香欲天天天影视综合网| 性久久久久久久久| 26uuu欧美| 91丨porny丨国产| 日本特黄久久久高潮| 国产女同互慰高潮91漫画|