At 2020-08-19 21:15:32, "Andreas Rheinhardt" <[email protected]> 
wrote:
>[email protected]:
>> From: hwren <[email protected]>
>> 
>> Signed-off-by: hwren <[email protected]>
>> ---
>>  libavcodec/Makefile |  2 +
>>  libavcodec/avs3.c   | 95 +++++++++++++++++++++++++++++++++++++++++++++
>>  libavcodec/avs3.h   | 52 +++++++++++++++++++++++++
>>  3 files changed, 149 insertions(+)
>>  create mode 100644 libavcodec/avs3.c
>>  create mode 100644 libavcodec/avs3.h
>> 
>> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
>> index 3431ba2dca..e1e0c4629d 100644
>> --- a/libavcodec/Makefile
>> +++ b/libavcodec/Makefile
>> @@ -6,6 +6,7 @@ HEADERS = ac3_parser.h                                       
>>            \
>>            avcodec.h                                                     \
>>            avdct.h                                                       \
>>            avfft.h                                                       \
>> +          avs3.h                                                        \
>>            bsf.h                                                         \
>>            codec.h                                                       \
>>            codec_desc.h                                                  \
>> @@ -32,6 +33,7 @@ OBJS = ac3_parser.o                                        
>>              \
>>         avdct.o                                                          \
>>         avpacket.o                                                       \
>>         avpicture.o                                                      \
>> +       avs3.o                                                           \
>>         bitstream.o                                                      \
>>         bitstream_filter.o                                               \
>>         bitstream_filters.o                                              \
>> diff --git a/libavcodec/avs3.c b/libavcodec/avs3.c
>> new file mode 100644
>> index 0000000000..8587e36def
>> --- /dev/null
>> +++ b/libavcodec/avs3.c
>> @@ -0,0 +1,95 @@
>> +/*
>> + * AVS3 related definition
>> + *
>> + * Copyright (C) 2020 Huiwen Ren, <[email protected]>
>> + *
>> + * This file is part of FFmpeg.
>> + *
>> + * FFmpeg is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * FFmpeg is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with FFmpeg; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
>> USA
>> + */
>> +
>> +#include "avs3.h"
>> +
>> +const AVRational ff_avs3_frame_rate_tab[16] = {
>> +    { 0    , 0   }, // forbid
>> +    { 24000, 1001},
>> +    { 24   , 1   },
>> +    { 25   , 1   },
>> +    { 30000, 1001},
>> +    { 30   , 1   },
>> +    { 50   , 1   },
>> +    { 60000, 1001},
>> +    { 60   , 1   },
>> +    { 100  , 1   },
>> +    { 120  , 1   },
>> +    { 200  , 1   },
>> +    { 240  , 1   },
>> +    { 300  , 1   },
>> +    { 0    , 0   }, // reserved
>> +    { 0    , 0   }  // reserved
>> +};
>> +
>> +const int ff_avs3_color_primaries_tab[10] = {
>> +    AVCOL_PRI_RESERVED0   ,    // 0
>> +    AVCOL_PRI_BT709       ,    // 1
>> +    AVCOL_PRI_UNSPECIFIED ,    // 2
>> +    AVCOL_PRI_RESERVED    ,    // 3
>> +    AVCOL_PRI_BT470M      ,    // 4
>> +    AVCOL_PRI_BT470BG     ,    // 5
>> +    AVCOL_PRI_SMPTE170M   ,    // 6
>> +    AVCOL_PRI_SMPTE240M   ,    // 7
>> +    AVCOL_PRI_FILM        ,    // 8
>> +    AVCOL_PRI_BT2020           // 9
>> +};
>> +
>> +const enum AVPictureType ff_avs3_image_type[4] = {
>> +    AV_PICTURE_TYPE_NONE,
>> +    AV_PICTURE_TYPE_I,
>> +    AV_PICTURE_TYPE_P,
>> +    AV_PICTURE_TYPE_B
>> +};
>
>These two coincide with the values of the constants, so they could be
>removed.

Indeed. But I prefer to keep these mappings in case any side changes their 
related tables,
and ensure the completeness of the group of definitions. These table may also 
help to
check the validity of the type value and describe supported range in AVS3.

Thanks.

>
>> \ No newline at end of file
>
>This should be fixed.

Will be fixed. Thanks.

Regards,
Huiwen Ren

>
>- Andreas
>_______________________________________________
>ffmpeg-devel mailing list
>[email protected]
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>[email protected] with subject "unsubscribe".


_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to