[FFmpeg-devel] [PATCH] avcodec/libx265: export choosen picture types
Michael Niedermayer
michaelni at gmx.at
Tue Mar 31 20:58:29 CEST 2015
On Tue, Mar 31, 2015 at 07:08:00PM +0100, Derek Buitenhuis wrote:
> On 3/30/2015 11:45 PM, Michael Niedermayer wrote:
> > pkt->pts = x265pic_out.pts;
> > pkt->dts = x265pic_out.dts;
> > + switch (x265pic_out.sliceType) {
> > + case X265_TYPE_IDR:
> > + case X265_TYPE_I: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; break;
> > + case X265_TYPE_P: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P; break;
> > + case X265_TYPE_B: avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B; break;
> > + }
>
> LGTM if you format it like this (for consistency in the file):
applied
>
> pkt->pts = x265pic_out.pts;
> pkt->dts = x265pic_out.dts;
>
> switch (x265pic_out.sliceType) {
> case X265_TYPE_I:
> avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
> break;
> case X265_TYPE_P:
> avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
> break;
> case X265_TYPE_B:
> avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B;
> break;
> }
>
> Also I assume it is set to AV_PICTURE_TYPE_NONE by default?
yes thats the value after init and thus before the first frame
if you want i can add a explicit default case though
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150331/20b7453a/attachment.asc>
More information about the ffmpeg-devel
mailing list