1
0
Fork 0

h264: don't use deprecated YUVJ pixel formats

A change in pixel format cause a full decoder re-init, which can lead to dropped frames.
Instead, rely on the color_range, as its supposed to be handled anyway.
This commit is contained in:
Hendrik Leppkes 2013-12-25 20:21:51 +01:00
parent 5330865f0c
commit 5095d1cef4
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 0 additions and 8 deletions

View File

@ -866,14 +866,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
if (CHROMA444(h)) {
if (h->avctx->colorspace == AVCOL_SPC_RGB)
*fmt++ = AV_PIX_FMT_GBRP;
else if (h->avctx->color_range == AVCOL_RANGE_JPEG)
*fmt++ = AV_PIX_FMT_YUVJ444P;
else
*fmt++ = AV_PIX_FMT_YUV444P;
} else if (CHROMA422(h)) {
if (h->avctx->color_range == AVCOL_RANGE_JPEG)
*fmt++ = AV_PIX_FMT_YUVJ422P;
else
*fmt++ = AV_PIX_FMT_YUV422P;
} else {
#if CONFIG_H264_DXVA2_HWACCEL
@ -889,9 +884,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
#if CONFIG_H264_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI;
#endif
if (h->avctx->color_range == AVCOL_RANGE_JPEG)
*fmt++ = AV_PIX_FMT_YUVJ420P;
else
*fmt++ = AV_PIX_FMT_YUV420P;
}
break;