[FFmpeg-cvslog] libx265: Pass through user-set frame type

Derek Buitenhuis git at videolan.org
Thu Jan 22 17:30:35 CET 2015


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Wed Jan 21 15:16:18 2015 +0000| [41e983f1a63927dc0a2596cf2f0f7a946a048f11] | committer: Derek Buitenhuis

libx265: Pass through user-set frame type

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41e983f1a63927dc0a2596cf2f0f7a946a048f11
---

 libavcodec/libx265.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 923c750..aee7ae2 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -224,6 +224,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
         x265pic.pts      = pic->pts;
         x265pic.bitDepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1;
+
+        x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I :
+                            pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P :
+                            pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B :
+                            X265_TYPE_AUTO;
     }
 
     ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,



More information about the ffmpeg-cvslog mailing list