⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 store.c

📁 H.263+(VC++商业源代码)
💻 C
字号:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <io.h>

#include "config.h"
#include "global.h"

/* private prototypes */
static void store_yuv_append _ANSI_ARGS_((unsigned char *src[],
  int offset, int incr, int height));
static void store_yuv1 _ANSI_ARGS_((unsigned char *src,
  int offset, int incr, int width, int height, int append));
static void putbyte _ANSI_ARGS_((int c));
static void putword _ANSI_ARGS_((int w));


/*
 * store a picture as either one frame or two fields
 */
void storeframe(src,frame)
unsigned char *src[];
int frame;
{
  store_yuv_append(src,0,coded_picture_width,vertical_size);
}

/*
 * store one frame or one field
 */


/* concatenated headerless file for y, u and v */
static void store_yuv_append(src,offset,incr,height)
unsigned char *src[];
int offset,incr,height;
{
  int hsize;
  hsize = horizontal_size;

  store_yuv1(src[0],offset,incr,hsize,height,1);

  offset>>=1; incr>>=1; hsize>>=1;
  height>>=1;

  store_yuv1(src[1],offset,incr,hsize,height,1);
  store_yuv1(src[2],offset,incr,hsize,height,1);
}

/* auxiliary routine */
static void store_yuv1(src,offset,incr,width,height,append)
unsigned char *src;
int offset,incr,width,height,append;
{
  int i, j;
  unsigned char *p;

  for (i=0; i<height; i++) {
    p = src + offset + incr*i;
    for (j=0; j<width; j++)
      *Destination ++ = *p++ ;
  }
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -