diff mbox

[FFmpeg-devel] avformat/matroska: fix MatroskaVideoFieldOrder enum values

Message ID 20161012195456.1812-1-jamrial@gmail.com
State Accepted
Commit dc781459cc1a927a944c709c4cb400bb953a4f45
Headers show

Commit Message

James Almer Oct. 12, 2016, 7:54 p.m. UTC
The spec says

9: Interlaced with bottom field displayed first and top field stored first
14: Interlaced with top field displayed first and bottom field stored first

And avcodec.h states

AV_FIELD_TB,          //< Top coded first, bottom displayed first
AV_FIELD_BT,          //< Bottom coded first, top displayed first

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/matroska.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Rice Oct. 12, 2016, 9:22 p.m. UTC | #1
> On Oct 12, 2016, at 3:54 PM, James Almer <jamrial@gmail.com> wrote:
> 
> The spec says
> 
> 9: Interlaced with bottom field displayed first and top field stored first
> 14: Interlaced with top field displayed first and bottom field stored first
> 
> And avcodec.h states
> 
> AV_FIELD_TB,          //< Top coded first, bottom displayed first
> AV_FIELD_BT,          //< Bottom coded first, top displayed first
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> libavformat/matroska.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> index 1ff76e6..15e401c 100644
> --- a/libavformat/matroska.h
> +++ b/libavformat/matroska.h
> @@ -286,8 +286,8 @@ typedef enum {
>     MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
>     MATROSKA_VIDEO_FIELDORDER_TT           = 1,
>     MATROSKA_VIDEO_FIELDORDER_BB           = 6,
> -    MATROSKA_VIDEO_FIELDORDER_BT           = 9,
> -    MATROSKA_VIDEO_FIELDORDER_TB           = 14,
> +    MATROSKA_VIDEO_FIELDORDER_TB           = 9,
> +    MATROSKA_VIDEO_FIELDORDER_BT           = 14,
> } MatroskaVideoFieldOrder;
> 
> typedef enum {
> -- 
> 2.9.1

LGTM. Thanks for fixing this. It now aligns to the same list in QuickTime as was intended in the spec.

Dave Rice
James Almer Oct. 12, 2016, 9:31 p.m. UTC | #2
On 10/12/2016 6:22 PM, Dave Rice wrote:
> 
>> On Oct 12, 2016, at 3:54 PM, James Almer <jamrial@gmail.com> wrote:
>>
>> The spec says
>>
>> 9: Interlaced with bottom field displayed first and top field stored first
>> 14: Interlaced with top field displayed first and bottom field stored first
>>
>> And avcodec.h states
>>
>> AV_FIELD_TB,          //< Top coded first, bottom displayed first
>> AV_FIELD_BT,          //< Bottom coded first, top displayed first
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> libavformat/matroska.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
>> index 1ff76e6..15e401c 100644
>> --- a/libavformat/matroska.h
>> +++ b/libavformat/matroska.h
>> @@ -286,8 +286,8 @@ typedef enum {
>>     MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
>>     MATROSKA_VIDEO_FIELDORDER_TT           = 1,
>>     MATROSKA_VIDEO_FIELDORDER_BB           = 6,
>> -    MATROSKA_VIDEO_FIELDORDER_BT           = 9,
>> -    MATROSKA_VIDEO_FIELDORDER_TB           = 14,
>> +    MATROSKA_VIDEO_FIELDORDER_TB           = 9,
>> +    MATROSKA_VIDEO_FIELDORDER_BT           = 14,
>> } MatroskaVideoFieldOrder;
>>
>> typedef enum {
>> -- 
>> 2.9.1
> 
> LGTM. Thanks for fixing this. It now aligns to the same list in QuickTime as was intended in the spec.
> 
> Dave Rice

Pushed, thanks.
Michael Niedermayer Oct. 12, 2016, 10:34 p.m. UTC | #3
On Wed, Oct 12, 2016 at 04:54:56PM -0300, James Almer wrote:
> The spec says
> 
> 9: Interlaced with bottom field displayed first and top field stored first
> 14: Interlaced with top field displayed first and bottom field stored first
> 
> And avcodec.h states
> 
> AV_FIELD_TB,          //< Top coded first, bottom displayed first
> AV_FIELD_BT,          //< Bottom coded first, top displayed first
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavformat/matroska.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/matroska.h b/libavformat/matroska.h
> index 1ff76e6..15e401c 100644
> --- a/libavformat/matroska.h
> +++ b/libavformat/matroska.h
> @@ -286,8 +286,8 @@ typedef enum {
>      MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
>      MATROSKA_VIDEO_FIELDORDER_TT           = 1,
>      MATROSKA_VIDEO_FIELDORDER_BB           = 6,
> -    MATROSKA_VIDEO_FIELDORDER_BT           = 9,
> -    MATROSKA_VIDEO_FIELDORDER_TB           = 14,
> +    MATROSKA_VIDEO_FIELDORDER_TB           = 9,
> +    MATROSKA_VIDEO_FIELDORDER_BT           = 14,
>  } MatroskaVideoFieldOrder;

this requires a bump in the version to cause a change to
LIBAVFORMAT_IDENT

the demuxer should use this version to detect and correct the past
muxer mistake

[...]
diff mbox

Patch

diff --git a/libavformat/matroska.h b/libavformat/matroska.h
index 1ff76e6..15e401c 100644
--- a/libavformat/matroska.h
+++ b/libavformat/matroska.h
@@ -286,8 +286,8 @@  typedef enum {
     MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2,
     MATROSKA_VIDEO_FIELDORDER_TT           = 1,
     MATROSKA_VIDEO_FIELDORDER_BB           = 6,
-    MATROSKA_VIDEO_FIELDORDER_BT           = 9,
-    MATROSKA_VIDEO_FIELDORDER_TB           = 14,
+    MATROSKA_VIDEO_FIELDORDER_TB           = 9,
+    MATROSKA_VIDEO_FIELDORDER_BT           = 14,
 } MatroskaVideoFieldOrder;
 
 typedef enum {