場景
?? ?????在指定編碼格式優(yōu)化點播的時候,指定像素格式 pFormatContext->streams[video_index]->codecpar->format = AV_PIX_FMT_YUVJ420P;
根據(jù)說法deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range,AV_PIX_FMT_YUV420P取代AV_PIX_FMT_YUV420P和設(shè)置顏色空間
創(chuàng)新互聯(lián)公司長期為超過千家客戶提供的網(wǎng)站建設(shè)服務(wù),團隊從業(yè)經(jīng)驗10年,關(guān)注不同地域、不同群體,并針對不同對象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺,與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為溧陽企業(yè)提供專業(yè)的網(wǎng)站設(shè)計制作、做網(wǎng)站,溧陽網(wǎng)站改版等技術(shù)服務(wù)。擁有十載豐富建站經(jīng)驗和眾多成功案例,為您定制開發(fā)。
int format;
????/**
???? * - video: the pixel format, the value corresponds to enum AVPixelFormat.
???? * - audio: the sample format, the value corresponds to enum AVSampleFormat.
???? */
?? ?
函數(shù)調(diào)用邏輯
av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
????????????av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n"); ? ?
區(qū)別
AV_PIX_FMT_YUVJ420P和AV_PIX_FMT_YUV420P兩者的不同在于,顏色空間不同。
AVCOL_RANGE_JPEG
/**
* MPEG vs JPEG YUV range.
*/
enum AVColorRange {
?AVCOL_RANGE_UNSPECIFIED = 0,
?AVCOL_RANGE_MPEG??????? = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges
?AVCOL_RANGE_JPEG??????? = 2, ///< the normal???? 2^n-1?? "JPEG" YUV ranges
?AVCOL_RANGE_NB,????????????? ///< Not part of ABI
};
YUVJ420P的字面含義是“使用了JPEG顏色范圍的YUV420P,像素使用表示顏色的數(shù)值范圍發(fā)生了變化。
YUV420p的像素顏色范圍是[16,235],16表示黑色,235表示白色
YUVJ420P的像素顏色范圍是[0,255]。0表示黑色,255表示白色
宏定義
enum AVPixelFormat {
??? AV_PIX_FMT_NONE = -1,
??? AV_PIX_FMT_YUV420P,?? ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
??? AV_PIX_FMT_YUYV422,?? ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
??? AV_PIX_FMT_RGB24,???? ///< packed RGB 8:8:8, 24bpp, RGBRGB...
??? AV_PIX_FMT_BGR24,???? ///< packed RGB 8:8:8, 24bpp, BGRBGR...
??? AV_PIX_FMT_YUV422P,?? ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
??? AV_PIX_FMT_YUV444P,?? ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
??? AV_PIX_FMT_YUV410P,?? ///< planar YUV 4:1:0,? 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
??? AV_PIX_FMT_YUV411P,?? ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
??? AV_PIX_FMT_GRAY8,???? ///<??????? Y??????? ,? 8bpp
??? AV_PIX_FMT_MONOWHITE, ///<??????? Y??????? ,? 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
??? AV_PIX_FMT_MONOBLACK, ///<??????? Y??????? ,? 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
??? AV_PIX_FMT_PAL8,????? ///< 8 bits with AV_PIX_FMT_RGB32 palette
??? AV_PIX_FMT_YUVJ420P,? ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
??? AV_PIX_FMT_YUVJ422P,? ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range
??? AV_PIX_FMT_YUVJ444P,? ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range
#if FF_API_XVMC
??? AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing
....
}
當(dāng)前文章:FFmpegdeprecatedpixelformatused問題描述
標(biāo)題路徑:http://aaarwkj.com/article44/pjdiee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、網(wǎng)站策劃、網(wǎng)站內(nèi)鏈、網(wǎng)站維護、企業(yè)網(wǎng)站制作、虛擬主機
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)