導航:首頁 > 知識產權 > libyuv版權

libyuv版權

發布時間:2021-03-19 10:02:51

⑴ 怎麼使用ffmpeg命令將422sp的yuv數據轉成h264文件

x264軟體和ffmpeg都直接可以轉換h264 比如命令 ffmpeg -i source.yuv -vcodec libx264 -vb 1000k outfile.mp4

⑵ 影音格式

直接在網路里查,不就OK了。

網路里的介紹是最全的了。

格式介紹:
http://ke..com/view/33401.html?tp=0_11

影音格式可以分為:音頻格式,視頻格式,圖片格式

音頻格式介紹:
http://ke..com/view/178954.html?tp=1_11

視頻格式介紹:
http://ke..com/view/2272.html?tp=3_11

圖片格式介紹:
http://ke..com/view/19666.html?tp=2_11

⑶ 有關YUV420文件處理中的函數參數問題~圖像處理或視頻幀圖像處理中的YUV

視頻的不清楚,不過stride_。。應該是跨距,
如果yuv分開放應該沒問題,如果yuv放在一起, 像 y u v y u v這樣, 同一類值並不是緊挨著, 就需要指定間距了, 比如每個y之間間隔3, y是uint8的,間距就是3位元組,
uyvy_out如果按uyvy存的話,那y的是2,u和v都是4,你最好直接看看那個函數的代碼,這樣比較確定

⑷ 如何使用jpeglib庫壓縮yuv422

找到了以前用過的一段程序,是可以正常工作的,你可以參考下

/**
riefjpeg編碼,輸入格式為uyvy
*/
voidwrite_YUV_JPEG_file(char*filename,unsignedchar*yuvData,intquality,
intimage_width,intimage_height)
{

structjpeg_compress_structcinfo;

structjpeg_error_mgrjerr;

FILE*outfile;/*targetfile*/
//JSAMPROWrow_pointer[1];/*pointertoJSAMPLErow[s]*/
//introw_stride;/*physicalrowwidthinimagebuffer*/
JSAMPIMAGEbuffer;

intband,i,buf_width[3],buf_height[3];
cinfo.err=jpeg_std_error(&jerr);

jpeg_create_compress(&cinfo);


if((outfile=fopen(filename,"wb"))==NULL){
fprintf(stderr,"can'topen%s ",filename);
exit(1);
}
jpeg_stdio_dest(&cinfo,outfile);


cinfo.image_width=image_width;/*imagewidthandheight,inpixels*/
cinfo.image_height=image_height;
cinfo.input_components=3;/*#ofcolorcomponentsperpixel*/
cinfo.in_color_space=JCS_YCbCr;/*colorspaceofinputimage*/

jpeg_set_defaults(&cinfo);

jpeg_set_quality(&cinfo,quality,TRUE);

//////////////////////////////
cinfo.raw_data_in=TRUE;
cinfo.jpeg_color_space=JCS_YCbCr;
cinfo.comp_info[0].h_samp_factor=2;
cinfo.comp_info[0].v_samp_factor=1;
/////////////////////////

jpeg_start_compress(&cinfo,TRUE);

buffer=(JSAMPIMAGE)(*cinfo.mem->alloc_small)((j_common_ptr)&cinfo,
JPOOL_IMAGE,3*sizeof(JSAMPARRAY));
for(band=0;band<3;band++)
{
buf_width[band]=cinfo.comp_info[band].width_in_blocks*DCTSIZE;
buf_height[band]=cinfo.comp_info[band].v_samp_factor*DCTSIZE;
buffer[band]=(*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo,
JPOOL_IMAGE,buf_width[band],buf_height[band]);
}

unsignedchar*rawData[3];
rawData[0]=yuvData;
rawData[1]=yuvData+image_width*image_height;
rawData[2]=yuvData+image_width*image_height*3/2;

intmax_line=cinfo.max_v_samp_factor*DCTSIZE;
for(intcounter=0;cinfo.next_scanline<cinfo.image_height;counter++)
{
//bufferimage.
for(band=0;band<3;band++)
{
intmem_size=buf_width[band];
unsignedchar*pDst=(unsignedchar*)buffer[band][0];
unsignedchar*pSrc=(unsignedchar*)(rawData[band]+//yuv.data[band]分別表示YUV起始地址
counter*buf_height[band]*buf_width[band]);

for(i=0;i<buf_height[band];i++)
{
memcpy(pDst,pSrc,mem_size);
pSrc+=buf_width[band];
pDst+=buf_width[band];
}
}
jpeg_write_raw_data(&cinfo,buffer,max_line);
}


jpeg_finish_compress(&cinfo);

fclose(outfile);

jpeg_destroy_compress(&cinfo);


}

⑸ 怎麼使用jpeglib庫壓縮yuv

找到了以前用過的一段程序,是可以正常工作的,你可以參考下
/**
\brief jpeg編碼,輸入格式為uyvy
*/
void write_YUV_JPEG_file (char * filename, unsigned char* yuvData, int quality,
int image_width,int image_height)
{

struct jpeg_compress_struct cinfo;

struct jpeg_error_mgr jerr;

FILE * outfile; /* target file */
//JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
//int row_stride; /* physical row width in image buffer */
JSAMPIMAGE buffer;

int band,i,buf_width[3],buf_height[3];
cinfo.err = jpeg_std_error(&jerr);

jpeg_create_compress(&cinfo);

if ((outfile = fopen(filename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
jpeg_stdio_dest(&cinfo, outfile);

cinfo.image_width = image_width; /* image width and height, in pixels */
cinfo.image_height = image_height;
cinfo.input_components = 3; /* # of color components per pixel */
cinfo.in_color_space = JCS_YCbCr; /* colorspace of input image */

jpeg_set_defaults(&cinfo);

jpeg_set_quality(&cinfo, quality, TRUE );

//////////////////////////////
cinfo.raw_data_in = TRUE;
cinfo.jpeg_color_space = JCS_YCbCr;
cinfo.comp_info[0].h_samp_factor = 2;
cinfo.comp_info[0].v_samp_factor = 1;
/////////////////////////

jpeg_start_compress(&cinfo, TRUE);

buffer = (JSAMPIMAGE) (*cinfo.mem->alloc_small) ((j_common_ptr) &cinfo,
JPOOL_IMAGE, 3 * sizeof(JSAMPARRAY));
for(band=0; band<3; band++)
{
buf_width[band] = cinfo.comp_info[band].width_in_blocks * DCTSIZE;
buf_height[band] = cinfo.comp_info[band].v_samp_factor * DCTSIZE;
buffer[band] = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo,
JPOOL_IMAGE, buf_width[band], buf_height[band]);
}

unsigned char *rawData[3];
rawData[0]=yuvData;
rawData[1]=yuvData+image_width*image_height;
rawData[2]=yuvData+image_width*image_height*3/2;

int max_line = cinfo.max_v_samp_factor*DCTSIZE;
for(int counter=0; cinfo.next_scanline < cinfo.image_height; counter++)
{
//buffer image .
for(band=0; band<3; band++)
{
int mem_size = buf_width[band];
unsigned char *pDst = (unsigned char *) buffer[band][0];
unsigned char *pSrc = (unsigned char *) (rawData[band] + //yuv.data[band]分別表示YUV起始地址
counter*buf_height[band] * buf_width[band]);

for(i=0; i<buf_height[band]; i++)
{
memcpy(pDst, pSrc, mem_size);
pSrc += buf_width[band];
pDst += buf_width[band];
}
}
jpeg_write_raw_data(&cinfo, buffer, max_line);
}

jpeg_finish_compress(&cinfo);

fclose(outfile);

jpeg_destroy_compress(&cinfo);

}

⑹ JPEGLIB支持YUV數據直接壓縮到JPG文件嗎

jpg簡介 jpg全名應該是JPEG JPEG 圖片以 24 位顏色存儲單個光柵圖像。JPEG 是與平台無關的格式,支持最高級別的壓縮,不過,這種壓縮是有損耗的。漸近式 JPEG 文件支持交錯。 jpg功能 可以提高或降低 JPEG 文件壓縮的級別。但是,文件大小是以圖像質量為代價的。壓縮比率可以高達 100:1。(JPEG 格式可在 10:1 到 20:1 的比率下輕松地壓縮文件,而圖片質量不會下降。)JPEG 壓縮可以很好地處理寫實攝影作品。但是,對於顏色較少、對比級別強烈、實心邊框或純色區域大的較簡單的作品,JPEG 壓縮無法提供理想的結果。有時,壓縮比率會低到 5:1,嚴重損失了圖片完整性。這一損失產生的原因是,JPEG 壓縮方案可以很好地壓縮類似的色調,但是 JPEG 壓縮方案不能很好地處理亮度的強烈差

⑺ 使用c#的directshowLib 直接播放yuv的參數設置

我用網吧里的網線插在自己用的筆記本上怎麼不 行?後來我搜索了一下改IP 可是都改完了還是不能用這是為什麼??? 跪求大嬸們來解釋·

⑻ libswscale\utils.c這個文件在哪

源代碼是自己創建YUVI420數據並轉換成RGB24數據
這里從yuv文件讀取
YUV文件可從這下,都是I420格式
出現 libavutil/common.h 意外文件尾 錯誤,定義下__STDC_CONSTANT_MACROS即可

⑼ 使用c#的directshowLib 直接播放yuv的參數設置

那是因為C++與C#中的數據類型不對應而照成的。你可以使用C#調用C++ DLL的導出函數,在你的C#中實現即可。C++的導出函數一般在SDK中會詳細說明,你對著改抄就可以了。下面給點例子:例如:C++的導出函數為:long WINAPI LoadDRV(void);你在C#中使用對應的方式聲明這個函數的對應函數[DllImport("Tc08a32.dll", EntryPoint = "LoadDRV", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern Int32 LoadDRV();DllImport的語法你可以在MSDN上面找到詳細的說明,這里對給出的示例做一下簡單的說明括弧中的第一個String參數是表明你要導入的DLL的目標路徑,可以是別人C++導出函數的路徑EntryPoint設置後,可以主動的搜索入口函數,可要可不要。CharSet是設置你接收時的字元類型的,這個很重要,某些時候,通過改變這個值的設置可以得到你的理想值。CallingConvention是指的一個導出標准,一般在C++的SDK中也可以看到這種導出標准,是什麼,就對應的用什麼。 注意使用時的類型轉換,因為變數的類型不同,則使用不同的對應關系,這個網上也有很多的介紹,很簡單。唯一需要注意的是一些指針類型,因為C#為安全機制沒有指針一般的,C++中的 Char * 在C#中可以使用一個String來傳值如果是LPSTR的話,那就需要使用一個char[]來實現,具體char[]有多長,你要根據你的SDK中的說明具體實現。實現完你需要的函數之後,你即可在你的項目中調用了。

閱讀全文

與libyuv版權相關的資料

熱點內容
武漢疫情投訴 瀏覽:149
知識產權合作開發協議doc 瀏覽:932
廣州加里知識產權代理有限公司 瀏覽:65
企業知識產權部門管理辦法 瀏覽:455
消費315投訴 瀏覽:981
馬鞍山鋼城醫院 瀏覽:793
馮超知識產權 瀏覽:384
介紹小發明英語作文 瀏覽:442
版權使用權協議 瀏覽:1000
2018年基本公共衛生服務考核表 瀏覽:884
馬鞍山候車亭 瀏覽:329
學校矛盾糾紛排查領導小組 瀏覽:709
張江管委會知識產權合作協議 瀏覽:635
關於開展公共衛生服務項目相關項目督導的函 瀏覽:941
閨蜜證書高清 瀏覽:11
轉讓房轉讓合同協議 瀏覽:329
矛盾糾紛排查調處工作協調交賬會議紀要 瀏覽:877
雲南基金從業資格證書查詢 瀏覽:313
新知識的搖籃創造力 瀏覽:187
股轉轉讓協議 瀏覽:676