Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/writeffmpeg.c
| Show First 20 Lines • Show All 720 Lines • ▼ Show 20 Lines | static AVStream *alloc_video_stream(FFMpegContext *context, | ||||
| } | } | ||||
| if (codec_id == AV_CODEC_ID_QTRLE) { | if (codec_id == AV_CODEC_ID_QTRLE) { | ||||
| if (rd->im_format.planes == R_IMF_PLANES_RGBA) { | if (rd->im_format.planes == R_IMF_PLANES_RGBA) { | ||||
| c->pix_fmt = AV_PIX_FMT_ARGB; | c->pix_fmt = AV_PIX_FMT_ARGB; | ||||
| } | } | ||||
| } | } | ||||
| if (codec_id == AV_CODEC_ID_VP9) { | if (codec_id == AV_CODEC_ID_VP9 && rd->im_format.planes == R_IMF_PLANES_RGBA) { | ||||
| if (rd->im_format.planes == R_IMF_PLANES_RGBA) { | |||||
| c->pix_fmt = AV_PIX_FMT_YUVA420P; | c->pix_fmt = AV_PIX_FMT_YUVA420P; | ||||
| } | } | ||||
| } | else if ((codec_id == AV_CODEC_ID_H264 || codec_id == AV_CODEC_ID_VP9) && | ||||
| context->ffmpeg_crf == 0) { | |||||
| /* Use 4:4:4 instead of 4:2:0 pixel format for lossless rendering. */ | /* Use 4:4:4 instead of 4:2:0 pixel format for lossless rendering. */ | ||||
| if ((codec_id == AV_CODEC_ID_H264 || codec_id == AV_CODEC_ID_VP9) && context->ffmpeg_crf == 0) { | |||||
| c->pix_fmt = AV_PIX_FMT_YUV444P; | c->pix_fmt = AV_PIX_FMT_YUV444P; | ||||
| } | } | ||||
| if (codec_id == AV_CODEC_ID_PNG) { | if (codec_id == AV_CODEC_ID_PNG) { | ||||
| if (rd->im_format.planes == R_IMF_PLANES_RGBA) { | if (rd->im_format.planes == R_IMF_PLANES_RGBA) { | ||||
| c->pix_fmt = AV_PIX_FMT_RGBA; | c->pix_fmt = AV_PIX_FMT_RGBA; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,166 Lines • Show Last 20 Lines | |||||