<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">My parameters are as follows:</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">(AVCodecContext*) pCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">AV_PIX_FMT_YUV420P is the default parameter when code_id is AV_CODEC_ID_HEVC and it is one of raw format. So
I think the order of frame I get from "avcodec_receive_frame(pCodecContext, pFrame);" is PTS and when I try to display the frame recieved, it can display properly. But its frame->pts is still not incremental.</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">I tried to set the pix_fmt to AV_PIX_FMT_NV12, but it doesn't work. The pix_fmt still change back to AV_PIX_FMT_YUV420P.</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">Do I set the wrong pix_fmt so that the it doesn't decode to the specific raw format? </span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">Thank you for for your last answer,</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">Carl</span></div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>发件人:</b> Libav-user <libav-user-bounces@ffmpeg.org> 代表 KIM via Libav-user <libav-user@ffmpeg.org><br>
<b>发送时间:</b> 2023年10月23日 13:02<br>
<b>收件人:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user@ffmpeg.org><br>
<b>抄送:</b> KIM <daniel.morandini@keepinmind.info><br>
<b>主题:</b> Re: [Libav-user] frame->pts out-of-order when decode hevc</span>
<div> </div>
</div>
<div><span style="font-size: 11pt;">> hello, everyone. this is my first time to use mail list.<br>
Hi! This is my first reply instead.<br>
<br>
> the set of pkt->pts is 0,1,2,3,4,5...<br>
> bus the frame->pts received is 0,1,4,5,3,6,2 where the pict_type is I, I, B, B, B, B, P...<br>
> why the frame->pts is not 0,1,2,3,4,5…<br>
PTS (presentation time stamp) tells you the order at which frames should be presented, which is not always the same as the order at which frames should be decoded! That’s the DTS field (decoding time stamp). After decoding to some raw format, you’ll see that
PTS are sorted as you expect.<br>
<br>
Basically what you’re seeing is the way it is supposed to be! I hope it clarifies your doubt.<br>
<br>
Cheers,<br>
dmorn<br>
<br>
<br>
> _______________________________________________<br>
> Libav-user mailing list<br>
> Libav-user@ffmpeg.org<br>
> <a href="https://ffmpeg.org/mailman/listinfo/libav-user" id="OWAd2ab3a70-f811-2f29-c350-b65b965b2645" class="OWAAutoLink" data-auth="NotApplicable">
https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Flibav-user&data=05%7C01%7C%7C91facdfa6525428daea808dbd3c869ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638336629966421037%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AObH0aA5PTGBVj1hiO4GirMtfx%2BWCxaHn3c0%2F2tvNVI%3D&reserved=0</a><br>
><br>
> To unsubscribe, visit link above, or email<br>
> libav-user-request@ffmpeg.org with subject "unsubscribe".<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
Libav-user@ffmpeg.org<br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" id="OWA9c845003-d050-b51d-e96c-bac41d067470" class="OWAAutoLink" data-auth="NotApplicable">https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Flibav-user&data=05%7C01%7C%7C91facdfa6525428daea808dbd3c869ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638336629966577310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NNI5o8%2F0eezh8famHxIOCKbfLzat6TqHeomsm3LuG%2F0%3D&reserved=0</a><br>
<br>
To unsubscribe, visit link above, or email<br>
libav-user-request@ffmpeg.org with subject "unsubscribe".</span></div>
</body>
</html>