Explain the function of static keyword and final keyword in Java in detail>>>
My own mistake in using the following function for conversion
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[]);
Answers to online search:
https://stackoverflow.com/questions/23067722/swscaler-warning-deprecated-pixel-format-used
The reason is that the format you use has been abolished. You can see which ones are not available in the following links:
https://libav.org/documentation/doxygen/master/pixfmt_ 8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5。
The conversion function I wrote:
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;
}
}
If you want to use a new format type and set the color range, you have not yet made clear the concept of color range. I will add it later and write it down first
Similar Posts:
- Image data type conversion uint8 and double in MATLAB
- [Solved] Warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
- [Solved] A label can only be part of statement and a declaratioin is not a statement
- deprecated conversion from string constant to char*
- [record a problem] Linux + opencv + cuvid decodes 1080p video. When using CUDA kernel function, it will crash
- C++ Error: passing ” “as” ” discards qualifiers
- How to Solve Const variable assignment Error
- [Solved] Operator overload must take either zero or one argument error
- [Solved] error C2275: ‘TOKEN’ : illegal use of this type as an expression
- DOM style setting methods in the four components of react