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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? chroma_resampling.c

?? itdm642開發(fā)板視頻編解碼源程序.已經(jīng)編譯好
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* ======================================================================== */
/* NAME                                                                     */
/*  chroma_resampling.c 										            */
/*                                                                          */
/*	DESCRIPTION																*/
/* This file contains chroma resampling routines for use with the ZENO      */
/* Video Port.                                                              */
/* All these routines have been written using the DMA streaming (dstr)      */
/* interface. Specifically, it contains the following APIs:                 */
/* YUV422to420v() - This routine performs the vertical part of chroma       */
/*                  resampling in going from 4:2:2 to 4:2:0                 */
/* YUV420to422v() - This routine performs the vertical part of chroma       */
/*                  resampling in going from 4:2:0 to 4:2:2                 */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2002 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */

/* ======================================================================== */
/* basic header includes                                                    */
/* ======================================================================== */
#include <stdio.h>
#include <stdlib.h>
#include <std.h>

/* ======================================================================== */
/* CSL includes                                                             */
/* ======================================================================== */
#include <csl.h>
#include <csl_irq.h>
#include <csl_dat.h>
#include <csl_cache.h>
#include <csl_legacy.h>

/* ======================================================================== */
/* include files for DMA streaming and scaling kernel that performs         */
/* vertical chroma resampling                                               */
/* ======================================================================== */
#include "dstr_2d.h"
#include "scale_v2_h.h"

/* ======================================================================== */
/* Image and scratch buffer structures for pre-post processing operations   */
/* ======================================================================== */

typedef struct {
					unsigned char *Y_data;
					unsigned char *Cb_data;
					unsigned char *Cr_data;
				} IMG;
typedef struct {
					unsigned char *in_data;
					int  size;
				}SCRATCH;			
					



/* ======================================================================== */
/* YUV422to420v() - vertical chroma resampling of source                    */
/* INTERFACE:                                                               */
/* void YUV422to420v(                                                       */
/*                  void *in,                                               */
/*                  void *out,                                              */
/*                  int width,                                              */
/*                  int height,                                             */
/*                  void *scratch                                           */
/*                  );                                                      */
/* RETURN VALUE: None                                                       */
/* PARAMETERS:                                                              */
/* in  - pointer to input data(planar Y:Cb:Cr 4:2:2 format)                 */
/* out - pointer to output data (planar Y:Cb:Cr 4:2:0 format)               */
/* width - pixels per line of source luma                                   */
/* height - number of lines of source luma                                  */
/* scratch - pointer to scratch buffer in DSP's internal memory(used by     */
/*           dstr interface for DMA operation)                              */
/* ======================================================================== */

void YUV422to420v(void *in,void *out,int width,int height,void *scratch) {
	
	int i,err_code;
	unsigned int id;
	
	/* ==================================================================== */
	/* External Buffer pointers                                             */
	/* ==================================================================== */
	unsigned char *Cr_in,*Cb_in;
	unsigned char *Cr_out,*Cb_out;
	
	/* ==================================================================== */
	/* Internal scratch pointer                                             */
	/* ==================================================================== */
	unsigned char *int_mem;
	
	/* ==================================================================== */
	/* dma stream objects                                                   */
	/* ==================================================================== */
	dstr_t din_Cr,din_Cb,dout_Cr,dout_Cb;
	
	
	/* ==================================================================== */
	/* Internal Buffer pointers                                             */
	/* ==================================================================== */
	unsigned char *Cb_in_int,*Cr_in_int,*Cb_out_int,*Cr_out_int;	
	unsigned char *Cb_in_sc,*Cr_in_sc,*Cb_out_sc,*Cr_out_sc;
	
	
	/* ==================================================================== */
	/* get pointers to input and output data(in external memory)            */
	/* ==================================================================== */
	Cr_in = ((IMG *)in)->Cr_data;
	Cb_in = ((IMG *)in)->Cb_data;
	
	Cr_out = ((IMG *)out)->Cr_data;
	Cb_out = ((IMG *)out)->Cb_data;	
	
	/* ==================================================================== */
	/* setup the internal scratch(work) buffers                             */
	/* ==================================================================== */
	int_mem = ((SCRATCH *)scratch)->in_data;
	Cb_in_sc  = int_mem;
	Cr_in_sc  = int_mem + 4  * width;
	Cb_out_sc = int_mem + 8  * width;
	Cr_out_sc = int_mem + 10  * width;
	
	/* ==================================================================== */
	/* The luminance data is not processed at all                           */
	/* Check if the user passed the same buffer pointers for input and      */
	/* output Y, else copy the data from input to output buffer             */
	/* ==================================================================== */
	
	if(((IMG *)in)->Y_data != ((IMG *)out)->Y_data){
	    for(i=0;i<height;i++){
	        id = DAT_copy(((IMG *)in)->Y_data +i*width,int_mem,width);	
	        DAT_wait(id);	    
	        id = DAT_copy(int_mem,((IMG *)out)->Y_data +i*width,width);	
	    }
	}
	
	DAT_wait(id);
	
	
	/* ==================================================================== */
	/* Set up the DMA streams                                               */
	/* ==================================================================== */
	
	
	/* ==================================================================== */
	/* open input chroma streams with the following parameters:             */
	/* size of external buffer -->  (width/2)*height (4:2:2 data)           */
	/* size of internal buffer -->  width*4 (work buffer needs to be atleast*/
	/*                              width*2 but we overallocate here)       */	
	/* size of each get        -->  width ( bring in two lines of chroma,   */	
	/*                               each width/2 pixels)                   */ 
	/* number of gets          -->  1                                       */
	/* external pointer stride -->  width   (stride by an amount equal to   */
	/*                              size of each get)                       */
	/* window size             -->  1 (double buffering)                    */	
	/* ==================================================================== */
	err_code = dstr_open(&din_Cb,
						 Cb_in,
						 width * height>> 1,
						 Cb_in_sc,
					 	 width * 4,
						 width,
					 	 1,
					  	 width,
						 1,
					  	 DSTR_INPUT);
	#ifdef DEBUG                     
    if(err_code)
    {
        LOG_printf(&trace, "error opening Cb buffer:%d \n", 
                   err_code);
    }
    #endif
    err_code = dstr_open(&din_Cr,
						 Cr_in,
						 width * height>> 1,
						 Cr_in_sc,
					 	 width * 4,
						 width,
					 	 1,
					  	 width,
						 1,
					  	 DSTR_INPUT);
	#ifdef DEBUG                     
    if(err_code)
    {
        LOG_printf(&trace, "error opening Cb buffer:%d \n", 
                   err_code);
    }
    #endif		
    
	/* ==================================================================== */
	/* open output chroma streams with the following parameters:            */
	/* size of external buffer -->  (width/2)*(height/2) (4:2:0 data)       */
	/* size of internal buffer -->  width (work buffer needs to be atleast  */
	/*                              twice the size of actual data sent out) */	
	/* size of each put        -->  width/2 ( send out one line of chroma,  */	
	/*                               of width/2 pixels)                     */ 
	/* number of puts          -->  1                                       */
	/* external pointer stride -->  width/2  (stride by an amount equal to  */
	/*                              size of each put)                       */
	/* window size             -->  1 (double buffering)                    */	
	/* ==================================================================== */
    err_code = dstr_open(&dout_Cb,
						 Cb_out,
						 width * height >> 2,
						 Cb_out_sc,
					 	 width ,
						 width >> 1,
					 	 1,
					  	 width >> 1,
						 1,
					  	 DSTR_OUTPUT);
	#ifdef DEBUG                     
    if(err_code)
    {
        LOG_printf(&trace, "error opening Cb buffer:%d \n", 
                   err_code);
    }
    #endif
    
    err_code = dstr_open(&dout_Cr,
						 Cr_out,
						 width * height >> 2,
						 Cr_out_sc,
					 	 width,
						 width >> 1,
					 	 1,
					  	 width >> 1,
						 1,
					  	 DSTR_OUTPUT);
	#ifdef DEBUG                     
    if(err_code)
    {
        LOG_printf(&trace, "error opening Cb buffer:%d \n", 
                   err_code);
    }
    #endif
    
    
	/* ==================================================================== */
	/* Data processing loop:                                                */
	/*                                                                      */
	/* Bring in data from external memory                                   */
	/*                                                                      */
	/* Use vertical half scaling kernel on chroma data in internal memory   */
	/*                                                                      */
	/* Send data back to external memory                                    */	
	/* ==================================================================== */

	for(i=0; i<height >> 1; i++) {
			
		Cb_in_int  = (unsigned char *)dstr_get(&din_Cb);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产高清一区二区三区 | 日韩视频免费观看高清完整版在线观看| 欧美久久久影院| 国产精品每日更新| 另类综合日韩欧美亚洲| 成人动漫一区二区三区| 欧美刺激脚交jootjob| 亚洲自拍都市欧美小说| 成人黄色软件下载| 日韩欧美色电影| 亚洲成人精品在线观看| 99久久精品免费看| 国产日韩精品一区二区浪潮av| 午夜欧美电影在线观看| 91热门视频在线观看| 久久久久久免费| 狂野欧美性猛交blacked| 欧美性做爰猛烈叫床潮| 亚洲人成在线观看一区二区| 国产露脸91国语对白| 日韩欧美在线1卡| 亚洲bdsm女犯bdsm网站| 欧美午夜免费电影| 亚洲黄色小视频| 色哟哟日韩精品| 一区在线播放视频| 99久久精品免费| 国产精品传媒入口麻豆| 成人av电影在线观看| 欧美激情综合五月色丁香小说| 黄色日韩网站视频| 精品国产123| 国产一区二区0| 久久蜜桃av一区二区天堂 | 亚洲一卡二卡三卡四卡| 色噜噜久久综合| 一区二区三区蜜桃| 欧美精品一卡两卡| 久久aⅴ国产欧美74aaa| 精品国产电影一区二区| 黑人巨大精品欧美黑白配亚洲| 久久影院午夜片一区| 国产一区二区三区免费| 欧美国产日韩在线观看| 91网站最新地址| 亚洲一区二区在线播放相泽| 欧美理论在线播放| 免费日韩伦理电影| 亚洲国产精品成人久久综合一区 | 国产精品你懂的在线欣赏| 国产成人h网站| 亚洲色图.com| 欧美日韩国产影片| 狠狠色狠狠色综合系列| 中文字幕不卡在线观看| 日本精品一区二区三区高清 | 中文字幕中文字幕在线一区| 色综合 综合色| 欧美a一区二区| 国产亚洲精品中文字幕| 在线日韩av片| 另类小说综合欧美亚洲| 久久精品男人天堂av| 色中色一区二区| 麻豆freexxxx性91精品| 亚洲天堂av一区| 日韩欧美一区在线| 91麻豆.com| 久久精品国产成人一区二区三区 | 日韩亚洲欧美高清| 成人av资源下载| 麻豆国产一区二区| 亚洲美女一区二区三区| 2020国产成人综合网| 在线亚洲欧美专区二区| 国产一区二区福利视频| 午夜电影一区二区三区| 中文av一区二区| 日韩一级成人av| 欧美午夜不卡视频| 成人成人成人在线视频| 韩国av一区二区三区| 亚洲h动漫在线| 亚洲欧洲成人av每日更新| 日韩欧美资源站| 欧美日韩一二区| a在线欧美一区| 国产曰批免费观看久久久| 亚洲成av人片在www色猫咪| 国产精品久久一卡二卡| 精品对白一区国产伦| 欧美日韩1区2区| 一本一道久久a久久精品| 国产一区二区三区不卡在线观看 | 日韩一区二区三区视频| 欧美系列亚洲系列| 91在线小视频| 成人av网站大全| 成人美女视频在线看| 国产一区久久久| 卡一卡二国产精品| 日本不卡一区二区三区| 亚洲福利一二三区| 亚洲成人一区在线| 一区二区理论电影在线观看| 亚洲精品日日夜夜| 亚洲精品视频在线看| 成人欧美一区二区三区黑人麻豆 | 一区二区三区精品在线| 中文字幕一区二区三区四区不卡| 国产清纯在线一区二区www| wwwwww.欧美系列| 久久亚洲影视婷婷| 久久九九久久九九| 国产欧美日韩不卡| 国产精品国产三级国产aⅴ中文| 欧美—级在线免费片| 国产精品美女一区二区三区 | 五月天激情综合网| 日本一区中文字幕| 日本不卡一区二区三区| 精品在线视频一区| 国产乱码精品一区二区三区忘忧草| 国模一区二区三区白浆| 国产精品亚洲第一区在线暖暖韩国 | 国产一区二区久久| 成人h动漫精品一区二| 99精品视频在线观看免费| 91久久精品一区二区| 欧美亚洲精品一区| 日韩欧美综合一区| 国产欧美日韩综合精品一区二区| 亚洲欧洲成人精品av97| 亚洲成人av一区二区三区| 日本不卡123| 国产成人在线免费观看| 不卡一区二区在线| 欧美午夜精品免费| 精品久久五月天| 综合欧美一区二区三区| 亚洲成年人影院| 国产一区二区不卡| 欧美亚洲动漫精品| 欧美精品一区二区三区高清aⅴ | 337p粉嫩大胆噜噜噜噜噜91av| 欧美国产日产图区| 亚洲一区在线电影| 精品一区二区日韩| 一本大道久久a久久精品综合| 欧美一三区三区四区免费在线看 | 大白屁股一区二区视频| 欧美视频自拍偷拍| 国产夜色精品一区二区av| 亚洲国产成人va在线观看天堂| 国产在线不卡视频| 欧美日本在线视频| 国产精品久久久久国产精品日日| 日韩极品在线观看| 不卡视频一二三四| 日韩欧美国产午夜精品| 综合久久综合久久| 狠狠色丁香婷婷综合久久片| 色激情天天射综合网| 欧美tickling挠脚心丨vk| 一区二区视频在线| 丰满亚洲少妇av| 精品粉嫩aⅴ一区二区三区四区| 亚洲精品一二三四区| 国产精品一二三区| 欧美一区二区观看视频| 亚洲另类色综合网站| 国产精品系列在线播放| 日韩一卡二卡三卡国产欧美| 亚洲欧美日韩国产一区二区三区 | 激情综合网最新| 欧美日韩一区二区三区视频| 国产精品卡一卡二| 国产伦精一区二区三区| 欧美一区午夜精品| 亚洲va国产天堂va久久en| 99精品欧美一区二区蜜桃免费 | 欧美群妇大交群中文字幕| 亚洲三级理论片| 成人一区在线看| 欧美激情一区二区在线| 国产一区91精品张津瑜| 日韩精品一区二区三区蜜臀| 天天操天天综合网| 欧美日韩国产高清一区| 亚洲一区在线观看免费观看电影高清| av亚洲精华国产精华精华| 亚洲国产精品传媒在线观看| 国产成人激情av| 中文字幕欧美三区| 成人性生交大片免费| 日本一区二区免费在线| 丁香婷婷综合色啪| 中国色在线观看另类| 高清成人在线观看| 国产精品久久久久久福利一牛影视 |