mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
tiffenc: deprecate using compression_level
This commit is contained in:
parent
f7f1835258
commit
8b7412fe4e
@ -231,6 +231,11 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
|
|||||||
p->key_frame = 1;
|
p->key_frame = 1;
|
||||||
avctx->coded_frame= &s->picture;
|
avctx->coded_frame= &s->picture;
|
||||||
|
|
||||||
|
#if FF_API_TIFFENC_COMPLEVEL
|
||||||
|
if (avctx->compression_level != FF_COMPRESSION_DEFAULT)
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Using compression_level to set compression "
|
||||||
|
"algorithm is deprecated. Please use the compression_algo private "
|
||||||
|
"option instead.\n");
|
||||||
if (avctx->compression_level == 0) {
|
if (avctx->compression_level == 0) {
|
||||||
s->compr = TIFF_RAW;
|
s->compr = TIFF_RAW;
|
||||||
} else if(avctx->compression_level == 2) {
|
} else if(avctx->compression_level == 2) {
|
||||||
@ -240,6 +245,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
|
|||||||
s->compr = TIFF_DEFLATE;
|
s->compr = TIFF_DEFLATE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
s->width = avctx->width;
|
s->width = avctx->width;
|
||||||
s->height = avctx->height;
|
s->height = avctx->height;
|
||||||
|
@ -107,5 +107,9 @@
|
|||||||
#ifndef FF_API_INTERNAL_CONTEXT
|
#ifndef FF_API_INTERNAL_CONTEXT
|
||||||
#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
|
#define FF_API_INTERNAL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_TIFFENC_COMPLEVEL
|
||||||
|
#define FF_API_TIFFENC_COMPLEVEL (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* AVCODEC_VERSION_H */
|
#endif /* AVCODEC_VERSION_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user