免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

FFmpegdeprecatedpixelformatused問題描述

場景
?? ?????在指定編碼格式優化點播的時候,指定像素格式 pFormatContext->streams[video_index]->codecpar->format = AV_PIX_FMT_YUVJ420P;
根據說法deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range,AV_PIX_FMT_YUV420P取代AV_PIX_FMT_YUV420P和設置顏色空間

創新互聯公司長期為超過千家客戶提供的網站建設服務,團隊從業經驗10年,關注不同地域、不同群體,并針對不同對象提供差異化的產品和服務;打造開放共贏平臺,與合作伙伴共同營造健康的互聯網生態環境。為溧陽企業提供專業的網站設計制作、做網站,溧陽網站改版等技術服務。擁有十載豐富建站經驗和眾多成功案例,為您定制開發。

int format;

????/**

???? * - video: the pixel format, the value corresponds to enum AVPixelFormat.
???? * - audio: the sample format, the value corresponds to enum AVSampleFormat.
???? */
?? ?

函數調用邏輯

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"); ? ?

區別

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,像素使用表示顏色的數值范圍發生了變化。

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
....
}

當前文章:FFmpegdeprecatedpixelformatused問題描述
標題路徑:http://m.newbst.com/article44/pjdiee.html

成都網站建設公司_創新互聯,為您提供面包屑導航網站策劃網站內鏈、網站維護、企業網站制作、虛擬主機

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

小程序開發