Re: [FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe

2024-05-06 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics




> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: środa, 17 kwietnia 2024 14:39
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the
> AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet
> contains a keyframe
> 
> On 4/17/2024 2:22 AM, Dawid Kozinski wrote:
> > Signed-off-by: Dawid Kozinski 
> > ---
> >   libavcodec/libxevd.c | 5 +
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index
> > c6c7327e65..e864bd5200 100644
> > --- a/libavcodec/libxevd.c
> > +++ b/libavcodec/libxevd.c
> > @@ -391,6 +391,11 @@ static int libxevd_receive_frame(AVCodecContext
> *avctx, AVFrame *frame)
> >   if (stat.read != nalu_size)
> >   av_log(avctx, AV_LOG_INFO, "Different reading of
> > bitstream (in:%d, read:%d)\n,", nalu_size, stat.read);
> >
> > +if (stat.stype == XEVD_ST_I) {
> > +frame->pict_type = AV_PICTURE_TYPE_I;
> > +frame->flags |= AV_FRAME_FLAG_KEY;
> > +}
> 
> Shouldn't this be inside the stat.fnum >= 0 block below?
> 
> > +
> >   // stat.fnum - has negative value if the decoded data is
not frame
> >   if (stat.fnum >= 0) {
Moved
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://protect2.fireeye.com/v1/url?k=a29889eb-c3139cd2-a29902a4-
> 000babffae10-eb1fef97e1007353=1=c04d8490-c1e2-4395-83d3-
> 7ea762e16a64=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmp
> eg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org
> with subject "unsubscribe".


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe

2024-04-18 Thread Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics




> -Original Message-
> From: ffmpeg-devel  On Behalf Of James
> Almer
> Sent: środa, 17 kwietnia 2024 14:39
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the
> AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet
> contains a keyframe
> 
> On 4/17/2024 2:22 AM, Dawid Kozinski wrote:
> > Signed-off-by: Dawid Kozinski 
> > ---
> >   libavcodec/libxevd.c | 5 +
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index
> > c6c7327e65..e864bd5200 100644
> > --- a/libavcodec/libxevd.c
> > +++ b/libavcodec/libxevd.c
> > @@ -391,6 +391,11 @@ static int libxevd_receive_frame(AVCodecContext
> *avctx, AVFrame *frame)
> >   if (stat.read != nalu_size)
> >   av_log(avctx, AV_LOG_INFO, "Different reading of
> > bitstream (in:%d, read:%d)\n,", nalu_size, stat.read);
> >
> > +if (stat.stype == XEVD_ST_I) {
> > +frame->pict_type = AV_PICTURE_TYPE_I;
> > +frame->flags |= AV_FRAME_FLAG_KEY;
> > +}
> 
> Shouldn't this be inside the stat.fnum >= 0 block below?

You're right. I will move it.

> 
> > +
> >   // stat.fnum - has negative value if the decoded data is
not frame
> >   if (stat.fnum >= 0) {
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://protect2.fireeye.com/v1/url?k=a29889eb-c3139cd2-a29902a4-
> 000babffae10-eb1fef97e1007353=1=c04d8490-c1e2-4395-83d3-
> 7ea762e16a64=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmp
> eg-devel
> 
> To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org
> with subject "unsubscribe".


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe

2024-04-17 Thread James Almer

On 4/17/2024 2:22 AM, Dawid Kozinski wrote:

Signed-off-by: Dawid Kozinski 
---
  libavcodec/libxevd.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
index c6c7327e65..e864bd5200 100644
--- a/libavcodec/libxevd.c
+++ b/libavcodec/libxevd.c
@@ -391,6 +391,11 @@ static int libxevd_receive_frame(AVCodecContext *avctx, 
AVFrame *frame)
  if (stat.read != nalu_size)
  av_log(avctx, AV_LOG_INFO, "Different reading of bitstream (in:%d, 
read:%d)\n,", nalu_size, stat.read);
  
+if (stat.stype == XEVD_ST_I) {

+frame->pict_type = AV_PICTURE_TYPE_I;
+frame->flags |= AV_FRAME_FLAG_KEY;
+}


Shouldn't this be inside the stat.fnum >= 0 block below?


+
  // stat.fnum - has negative value if the decoded data is not frame
  if (stat.fnum >= 0) {

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe

2024-04-16 Thread Dawid Kozinski
Signed-off-by: Dawid Kozinski 
---
 libavcodec/libxevd.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
index c6c7327e65..e864bd5200 100644
--- a/libavcodec/libxevd.c
+++ b/libavcodec/libxevd.c
@@ -391,6 +391,11 @@ static int libxevd_receive_frame(AVCodecContext *avctx, 
AVFrame *frame)
 if (stat.read != nalu_size)
 av_log(avctx, AV_LOG_INFO, "Different reading of bitstream 
(in:%d, read:%d)\n,", nalu_size, stat.read);
 
+if (stat.stype == XEVD_ST_I) { 
+frame->pict_type = AV_PICTURE_TYPE_I;
+frame->flags |= AV_FRAME_FLAG_KEY;
+}
+
 // stat.fnum - has negative value if the decoded data is not frame
 if (stat.fnum >= 0) {
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".