Re: [FFmpeg-devel] [PATCH] avcodec/dvdec: correctly set interlaced and tff

2019-11-06 Thread Baptiste Coudurier

> On Nov 2, 2019, at 12:00 PM, Baptiste Coudurier 
>  wrote:
> 
> On Wed, Sep 11, 2019 at 1:29 PM Baptiste Coudurier 
> mailto:baptiste.coudur...@gmail.com>> wrote:
> Hey Carl,
> 
>> On Sep 11, 2019, at 12:38 PM, Carl Eugen Hoyos > > wrote:
>> 
>> Am Mi., 11. Sept. 2019 um 21:31 Uhr schrieb Baptiste Coudurier
>> mailto:baptiste.coudur...@gmail.com>>:
>>> 
>>> ---
>>> libavcodec/dvdec.c | 13 ++---
>>> 1 file changed, 10 insertions(+), 3 deletions(-)
>>> 
>>> diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
>>> index 4345cd9e29..cfa0fb9905 100644
>>> --- a/libavcodec/dvdec.c
>>> +++ b/libavcodec/dvdec.c
>>> @@ -592,12 +592,19 @@ static int dvvideo_decode_frame(AVCodecContext 
>>> *avctx, void *data,
>>> 
>>> if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
>>> return ret;
>>> -frame.f->interlaced_frame = 1;
>>> -frame.f->top_field_first  = 0;
>>> 
>>> /* Determine the codec's field order from the packet */
>>> if ( *vsc_pack == dv_video_control ) {
>>> -frame.f->top_field_first = !(vsc_pack[3] & 0x40);
>>> +if (avctx->height == 720) {
>>> +frame.f->interlaced_frame = 0;
>>> +frame.f->top_field_first = 0;
>>> +} else if (avctx->height == 1080) {
>>> +frame.f->interlaced_frame = 1;
>>> +frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
>>> +} else {
>>> +frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
>>> +frame.f->top_field_first = !(vsc_pack[3] & 0x40);
>> 
>> Does this fix ticket #5092?
> Will apply

Applied

— 
Baptiste
___
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] avcodec/dvdec: correctly set interlaced and tff

2019-11-02 Thread Baptiste Coudurier
On Wed, Sep 11, 2019 at 1:29 PM Baptiste Coudurier <
baptiste.coudur...@gmail.com> wrote:

> Hey Carl,
>
> On Sep 11, 2019, at 12:38 PM, Carl Eugen Hoyos  wrote:
>
> Am Mi., 11. Sept. 2019 um 21:31 Uhr schrieb Baptiste Coudurier
> :
>
>
> ---
> libavcodec/dvdec.c | 13 ++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
> index 4345cd9e29..cfa0fb9905 100644
> --- a/libavcodec/dvdec.c
> +++ b/libavcodec/dvdec.c
> @@ -592,12 +592,19 @@ static int dvvideo_decode_frame(AVCodecContext
> *avctx, void *data,
>
> if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
> return ret;
> -frame.f->interlaced_frame = 1;
> -frame.f->top_field_first  = 0;
>
> /* Determine the codec's field order from the packet */
> if ( *vsc_pack == dv_video_control ) {
> -frame.f->top_field_first = !(vsc_pack[3] & 0x40);
> +if (avctx->height == 720) {
> +frame.f->interlaced_frame = 0;
> +frame.f->top_field_first = 0;
> +} else if (avctx->height == 1080) {
> +frame.f->interlaced_frame = 1;
> +frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
> +} else {
> +frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
> +frame.f->top_field_first = !(vsc_pack[3] & 0x40);
>
>
> Does this fix ticket #5092?
>
> Will apply
>
> —
> Baptiste Coudurier
>
___
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] avcodec/dvdec: correctly set interlaced and tff

2019-09-11 Thread Baptiste Coudurier
Hey Carl,

> On Sep 11, 2019, at 12:38 PM, Carl Eugen Hoyos  wrote:
> 
> Am Mi., 11. Sept. 2019 um 21:31 Uhr schrieb Baptiste Coudurier
> :
>> 
>> ---
>> libavcodec/dvdec.c | 13 ++---
>> 1 file changed, 10 insertions(+), 3 deletions(-)
>> 
>> diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
>> index 4345cd9e29..cfa0fb9905 100644
>> --- a/libavcodec/dvdec.c
>> +++ b/libavcodec/dvdec.c
>> @@ -592,12 +592,19 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, 
>> void *data,
>> 
>> if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
>> return ret;
>> -frame.f->interlaced_frame = 1;
>> -frame.f->top_field_first  = 0;
>> 
>> /* Determine the codec's field order from the packet */
>> if ( *vsc_pack == dv_video_control ) {
>> -frame.f->top_field_first = !(vsc_pack[3] & 0x40);
>> +if (avctx->height == 720) {
>> +frame.f->interlaced_frame = 0;
>> +frame.f->top_field_first = 0;
>> +} else if (avctx->height == 1080) {
>> +frame.f->interlaced_frame = 1;
>> +frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
>> +} else {
>> +frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
>> +frame.f->top_field_first = !(vsc_pack[3] & 0x40);
> 
> Does this fix ticket #5092?

Yes, I think it does

— 
Baptiste Coudurier

___
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] avcodec/dvdec: correctly set interlaced and tff

2019-09-11 Thread Carl Eugen Hoyos
Am Mi., 11. Sept. 2019 um 21:31 Uhr schrieb Baptiste Coudurier
:
>
> ---
>  libavcodec/dvdec.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
> index 4345cd9e29..cfa0fb9905 100644
> --- a/libavcodec/dvdec.c
> +++ b/libavcodec/dvdec.c
> @@ -592,12 +592,19 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, 
> void *data,
>
>  if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
>  return ret;
> -frame.f->interlaced_frame = 1;
> -frame.f->top_field_first  = 0;
>
>  /* Determine the codec's field order from the packet */
>  if ( *vsc_pack == dv_video_control ) {
> -frame.f->top_field_first = !(vsc_pack[3] & 0x40);
> +if (avctx->height == 720) {
> +frame.f->interlaced_frame = 0;
> +frame.f->top_field_first = 0;
> +} else if (avctx->height == 1080) {
> +frame.f->interlaced_frame = 1;
> +frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
> +} else {
> +frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
> +frame.f->top_field_first = !(vsc_pack[3] & 0x40);

Does this fix ticket #5092?

Carl Eugen
___
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] avcodec/dvdec: correctly set interlaced and tff

2019-09-11 Thread Baptiste Coudurier
---
 libavcodec/dvdec.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 4345cd9e29..cfa0fb9905 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -592,12 +592,19 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, 
void *data,
 
 if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
 return ret;
-frame.f->interlaced_frame = 1;
-frame.f->top_field_first  = 0;
 
 /* Determine the codec's field order from the packet */
 if ( *vsc_pack == dv_video_control ) {
-frame.f->top_field_first = !(vsc_pack[3] & 0x40);
+if (avctx->height == 720) {
+frame.f->interlaced_frame = 0;
+frame.f->top_field_first = 0;
+} else if (avctx->height == 1080) {
+frame.f->interlaced_frame = 1;
+frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
+} else {
+frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
+frame.f->top_field_first = !(vsc_pack[3] & 0x40);
+}
 }
 
 s->buf = buf;
-- 
2.20.1 (Apple Git-117)

___
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".