transform_block.c

来自「Motion JPEG编解码器源代码」· C语言 代码 · 共 61 行

C
61
字号
/*********************************************************** * YUVDEINTERLACER for the mjpegtools                      * * ------------------------------------------------------- * * (C) 2001-2004 Stefan Fendt                              * *                                                         * * Licensed and protected by the GNU-General-Public-       * * License version 2 or if you prefer any later version of * * that license). See the file LICENSE for detailed infor- * * mation.                                                 * *                                                         * * FILE: transform_block.c                                 * *                                                         * ***********************************************************/#include "config.h"#include "mjpeg_types.h"#include "transform_block.h"voidtransform_block (uint8_t * a1, uint8_t * a2, uint8_t * a3, int rowstride){  int x, y;  for (y = 0; y < 8; y++)    {      for (x = 0; x < 8; x++)	{	  *(a1) = (*(a2) + *(a3)) / 2;	  a1++;	  a2++;	  a3++;	}      /* process every second line */      a1 += rowstride - 8;      a2 += rowstride - 8;      a3 += rowstride - 8;    }}voidtransform_block_chroma (uint8_t * a1, uint8_t * a2, uint8_t * a3,			int rowstride){  int x, y;  for (y = 0; y < 4; y++)    {      for (x = 0; x < 4; x++)	{	  *(a1) = (*(a2) + *(a3)) / 2;	  a1++;	  a2++;	  a3++;	}      /* process every second line */      a1 += rowstride - 4;      a2 += rowstride - 4;      a3 += rowstride - 4;    }}

⌨️ 快捷键说明

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