mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
fix VUI full range flag in RKMPP encoded videos. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
202fd767e2
commit
0bf5184715
1 changed files with 11 additions and 0 deletions
|
|
@ -357,6 +357,17 @@ static int rkmpp_set_enc_cfg(AVCodecContext *avctx)
|
|||
mpp_enc_cfg_set_s32(cfg, "prep:rotation", 0);
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:flip", 0);
|
||||
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:colorspace", avctx->colorspace);
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:colorprim", avctx->color_primaries);
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:colortrc", avctx->color_trc);
|
||||
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:colorrange", avctx->color_range);
|
||||
if (r->pix_fmt == AV_PIX_FMT_YUVJ420P ||
|
||||
r->pix_fmt == AV_PIX_FMT_YUVJ422P ||
|
||||
r->pix_fmt == AV_PIX_FMT_YUVJ444P) {
|
||||
mpp_enc_cfg_set_s32(cfg, "prep:colorrange", AVCOL_RANGE_JPEG);
|
||||
}
|
||||
|
||||
if (avctx->framerate.den > 0 && avctx->framerate.num > 0)
|
||||
av_reduce(&fps_num, &fps_den, avctx->framerate.num, avctx->framerate.den, 65535);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue