我自己在使用如下函数进行转换时报的错

int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],
const int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *const dst[], const int dstStride[]);

网上搜索的答案:

https://stackoverflow.com/questions/23067722/swscaler-warning-deprecated-pixel-format-used

原因就是你使用的格式已经被废除了,在如下链接可以看到哪些不能用了:

https://libav.org/documentation/doxygen/master/pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5

我写的转换函数:

AVPixelFormat ConvertDeprecatedFormat(enum AVPixelFormat format)
{
switch (format)
{
case AV_PIX_FMT_YUVJ420P:
return AV_PIX_FMT_YUV420P;
break;
case AV_PIX_FMT_YUVJ422P:
return AV_PIX_FMT_YUV422P;
break;
case AV_PIX_FMT_YUVJ444P:
return AV_PIX_FMT_YUV444P;
break;
case AV_PIX_FMT_YUVJ440P:
return AV_PIX_FMT_YUV440P;
break;
default:
return format;
break;
}
}

要使用新的格式类型,并且设置color range,还没有弄清color range的概念,后续再补充,先记下来。

[swscaler @ ...] deprecated pixel format used, make sure you did set range correctly的更多相关文章

  1. opengl redbook Fatal Error in XXXXXX pixel format with necessary capabilities not found

    随便运行书中的一个程序aaindex.c时出现了下面的错误:pixel format with necessary capabilities not found 解决方法: http://www.ed ...

  2. 【VS开发】【图像处理】V4L2 pixel format

    目录(?)[-] v4l2_pix_format定义 2 具体Pixel Format定义 1. v4l2_pix_format定义 [cpp] view plain copy /* *  V I D ...

  3. 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator.

    let newStr = String(str[..<index]) // = str.substring(to: index) In Swift 3 let newStr = String(s ...

  4. FFmpeg 'scale' filter not present, cannot convert pixel formats.

    /*************************************************************************** * FFmpeg 'scale' filter ...

  5. FFmpeg资料来源简单分析:libswscale的sws_getContext()

    ===================================================== FFmpeg库函数的源代码的分析文章: [骨架] FFmpeg源码结构图 - 解码 FFmp ...

  6. FFmpeg源代码简单分析:libswscale的sws_getContext()

    ===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...

  7. Java版流媒体编解码和图像处理(JavaCPP+FFmpeg)

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  8. Why does OpenCV use BGR color format ?【转】

    转自:http://www.learnopencv.com/why-does-opencv-use-bgr-color-format/ One of the elements of good desi ...

  9. Docker inspect - format格式化输出 - 运维笔记

    Docker --format 参数提供了基于 Go模板 的日志格式化输出辅助功能,并提供了一些内置的增强函数. 什么是模板?上图是大家熟悉的 MVC 框架(Model View Controller ...

随机推荐

  1. window下载并且安装kafka

    安装zookeeper kafka运行需要有jdk+zookeeper环境才能够使用,jdk的安装和环境变量的配置就不介绍了,这里需要先安装zookeeper.可以从官网上下载 https://www ...

  2. acm数论之旅--欧拉函数的证明

    随笔 - 20  文章 - 0  评论 - 73 ACM数论之旅7---欧拉函数的证明及代码实现(我会证明都是骗人的╮( ̄▽ ̄)╭) https://blog.csdn.net/chen_ze_hua ...

  3. BZOJ 3262: 陌上花开 (cdq分治,三维偏序)

    #include <iostream> #include <stdio.h> #include <algorithm> using namespace std; c ...

  4. jdk 9 10 11 12 13 新特性

    jdk 9 新特性 1.集合加强 jdk9 为所有集合(List/Set/Map)都增加了 of 和 copyOf 方法,用来创建不可变集合,即一旦创建就无法再执行添加.删除.替换.排序等操作,否则将 ...

  5. AliWareMQ

    mq配置文件(Spring) 主要是顺序消息的配置,以及多实例的配置(需要在控制台配置p/c) <?xml version="1.0" encoding="UTF- ...

  6. Git主库私库相关操作操作

    命令1: git remote add 库名称 库地址 说明:写好的代码提交到两个git远端,git remote add是将另一个库地址设置进来 命令2: git fetch 库名称 分支名称 说明 ...

  7. 学习笔记(22)- plato-训练端到端的模型

    原始文档 Train an end-to-end model To get started we can train a very simple model using Ludwig (feel fr ...

  8. 计算机二级-C语言-程序设计题-190118记录-通过数组和指针两种方式对字符串进行处理。

    //编写一个函数fun,比较两个字符串的长度,(不使用C语言提供的求字符串长度的函数),函数返回较长的字符串.若两个字符长度相同,则返回第一个字符串. //重难点:通过数组处理和通过指针进行处理的不同 ...

  9. Net Core解决ZipFile解压中文出现乱码

    一.在main方法中添加 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 二.解压添加 //sourceArchiveFi ...

  10. 《Web安全攻防 渗透测试实战指南 》 学习笔记 (五)

    Web安全攻防 渗透测试实战指南   学习笔记 (五)   第四章 Web安全原理解析  (一) (一)SQL注入的原理 1.web应用程序对用户输入数据的合法性没有判断. 2.参数用户可控:前端传给 ...