History

avcodec/ljpegenc: Allow full range yuv420p, yuv422p, yuv444p by default

The documentation for AV_PIX_FMT_YUVJ420P reads: "planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range" Yet the LJPEG encoder only accepts full scale yuv420p when strictness is set to unofficial or lower; with default strictness it emits a nonsense error message that says that limit range YUV is unofficial. This has been changed to allow full range yuv420p, yuv422p and yuv444p irrespective of the level of strictness.

Andreas Rheinhardt committed 5 years ago

Commit 48cda7d1 parent 159bcb11 file · +3 −2Browse files

Unified · Split

libavcodec/ljpegenc.c+3−2
@@ -295,10 +295,11 @@ static av_cold int ljpeg_encode_init(AVCodecContext *avctx) · 294 unmodified lines
295295 avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
296296 avctx->pix_fmt == AV_PIX_FMT_YUV444P ||
297297 avctx->color_range == AVCOL_RANGE_MPEG) &&
298+ avctx->color_range != AVCOL_RANGE_JPEG &&
298299 avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
299300 av_log(avctx, AV_LOG_ERROR,
300− "Limited range YUV is non-standard, set strict_std_compliance to "
301− "at least unofficial to use it.\n");
301+ "Non full-range YUV is non-standard, set strict_std_compliance "
302+ "to at most unofficial to use it.\n");
302303 return AVERROR(EINVAL);
303304 }
304305

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t