sws_getContext用法实例
来源:互联网 发布:2016淘宝流量突然暴跌 编辑:程序博客网 时间:2024/05/17 01:31
sws_getContext用法实例
视频编码 2009-06-30 10:16:57 阅读782 评论1 字号:大中小 订阅
- struct SwsContext* sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
- Returns an SwsContext to be used in sws_scale.
Params:
srcW, srcH, srcFormat: source width, height, and pix format
dstW, dstH, dstFormat: destination width, height, and pix format
flags: Method of scaling to use. Choices are SWS_FAST_BILINEAR, SWS_BILINEAR, SWS_BICUBIC, SWS_X, SWS_POINT, SWS_AREA, SWS_BICUBLIN, SWS_GAUSS, SWS_SINC, SWS_LANCZOS, SWS_SPLINE. Other flags include CPU capability flags: SWS_CPU_CAPS_MMX, SWS_CPU_CAPS_MMX2, SWS_CPU_CAPS_3DNOW, SWS_CPU_CAPS_ALTIVEC. Other flags include (currently not completely implemented) SWS_FULL_CHR_H_INT, SWS_FULL_CHR_H_INP, and SWS_DIRECT_BGR. Finally we have SWS_ACCURATE_RND and perhaps the most useful for beginners, SWS_PRINT_INFO. I have no idea what most of these do. Maybe email me?
srcFilter, dstFilter: SwsFilter for source and destination. SwsFilter involves chroma/luminsence filtering. A value of NULL sets these to the default.
param: should be a pointer to an int[2] buffer with coefficients. Not documented. Looks like it's used to alter the default scaling algorithms slightly. A value of NULL sets this to the default. Experts only!
使用方法如下:
#define W 96
#define H 96
struct SwsContext *sws;
sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUV420P, 2, NULL, NULL, NULL);
用途:
sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride);
- sws_getContext用法实例
- sws_getContext用法实例
- sws_getContext用法实例 收藏
- sws_getContext的用法
- sws_getContext()
- sws_getContext 使用
- sws_getContext函数参数介绍
- sws_getContext /sws_scale内存泄露问题
- sws_getContext函数分析 for ffmpeg
- ffmpeg sws_getContext YUV压缩 图片压缩
- FFmpeg源代码简单分析:libswscale的sws_getContext()
- FFmpeg源代码分析:libswswcale的sws_getContext()
- FFmpeg源代码简单分析:libswscale的sws_getContext()
- FFmpeg 的sws_getContext函数 、sws_scale函数
- FFmpeg源代码简单分析:libswscale的sws_getContext()
- FFmpeg 的sws_getContext函数 、sws_scale函数
- FFmpeg源代码分析:libswscale的sws_getContext()
- ResultSetMete用法实例
- JTable常见用法细则
- 循序渐进学习使用WINPCAP(三)
- 斯坦福大学开放课程——编程方法 作业1-3 (附作业中文翻译及源码)【放置黑白棋盘】
- 【zz】Using libavformat and libavcodec
- js操作select
- sws_getContext用法实例
- ffmpeg中sws_scale()用法实例---part of FFmpeg
- Firefox 4 build with Qt (Linux Version)
- 转文:使用lucene中文分析器优化中文检索
- HDU 1166 敌兵布阵
- 在HGE里添加音乐,并实时控制音量
- VMWare虚拟机和主机共享/传输/拷贝文件三种方法
- Installing Guest Additions in VirtualBox for an Ubuntu Server Guest
- C++二分法经典例子