Purely formal review, I do not know about stereoscopic metadata.

Le tridi 23 ventôse, an CCXXI, Vittorio Giovara a écrit :
> ---
>  libavcodec/avcodec.h    |    3 +++
>  libavcodec/options.c    |    2 ++
>  libavutil/Makefile      |    2 ++
>  libavutil/stereoscopy.c |   11 +++++++++++
>  libavutil/stereoscopy.h |   29 +++++++++++++++++++++++++++++

The lavc and lavu parts may probably be split.

>  5 files changed, 47 insertions(+)
>  create mode 100644 libavutil/stereoscopy.c
>  create mode 100644 libavutil/stereoscopy.h
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index e48b114..9cc1976 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -36,6 +36,7 @@
>  #include "libavutil/log.h"
>  #include "libavutil/pixfmt.h"
>  #include "libavutil/rational.h"
> +#include "libavutil/stereoscopy.h"
>  
>  #include "libavcodec/version.h"
>  /**
> @@ -2624,6 +2625,8 @@ typedef struct AVCodecContext {
>       * - decoding: unused.
>       */
>      uint64_t vbv_delay;

> +
> +    AVStereo stereo_info;
>  } AVCodecContext;

Missing doxygen.

>  
>  /**
> diff --git a/libavcodec/options.c b/libavcodec/options.c
> index d140552..181df89 100644
> --- a/libavcodec/options.c
> +++ b/libavcodec/options.c
> @@ -97,6 +97,8 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const 
> AVCodec *codec)
>      s->sample_fmt          = AV_SAMPLE_FMT_NONE;
>  
>      s->reordered_opaque    = AV_NOPTS_VALUE;
> +    avstereo_init(&s->stereo_info);
> +
>      if(codec && codec->priv_data_size){
>          if(!s->priv_data){
>              s->priv_data= av_mallocz(codec->priv_data_size);
> diff --git a/libavutil/Makefile b/libavutil/Makefile
> index 68a8386..018cc1d 100644
> --- a/libavutil/Makefile
> +++ b/libavutil/Makefile
> @@ -41,6 +41,7 @@ HEADERS = adler32.h                                         
>             \
>            rational.h                                                    \
>            samplefmt.h                                                   \
>            sha.h                                                         \
> +          stereoscopy.h                                                 \
>            time.h                                                        \
>            version.h                                                     \
>            xtea.h                                                        \
> @@ -92,6 +93,7 @@ OBJS = adler32.o                                            
>             \
>         rc4.o                                                            \
>         samplefmt.o                                                      \
>         sha.o                                                            \
> +       stereoscopy.o                                                    \
>         time.o                                                           \
>         tree.o                                                           \
>         utils.o                                                          \
> diff --git a/libavutil/stereoscopy.c b/libavutil/stereoscopy.c
> new file mode 100644
> index 0000000..10dc810
> --- /dev/null

> +++ b/libavutil/stereoscopy.c
> @@ -0,0 +1,11 @@
> +
> +#include "stereoscopy.h"

Missing copyright boilerplate.

> +
> +
> +void avstereo_init(AVStereo *s)
> +{

> +    s->type = STEREO_NONE;
> +    s->order = ORDER_NA;
> +    s->fullsize = 0;

Alignment would be nice.

> +}
> +
> diff --git a/libavutil/stereoscopy.h b/libavutil/stereoscopy.h
> new file mode 100644
> index 0000000..f49d5ac
> --- /dev/null

> +++ b/libavutil/stereoscopy.h
> @@ -0,0 +1,29 @@

Missing copyright boilerplate.

> +
> +#include "libavutil/avutil.h"
> +
> +
> +enum stereoType {
> +    STEREO_NONE,
> +    STEREO_ANAGLYPH,
> +    STEREO_FRAMESEQUENCE,
> +    STEREO_SIDEBYSIDE,
> +    STEREO_TOPBOTTOM,
> +    STEREO_CHECKERS,
> +    STEREO_LINES,
> +    STEREO_COLUMNS,
> +};
> +
> +enum stereoOrder {
> +    ORDER_NA,
> +    ORDER_LR,
> +    ORDER_RL,
> +};

Missing AV prefix for the enum names and values.

Missing documentation.

> +
> +typedef struct AVStereo {
> +    enum stereoType type;
> +    enum stereoOrder order;
> +    int fullsize;
> +} AVStereo;
> +
> +

> +void avstereo_init(AVStereo *s);

Structure size part of the ABI -> impossible to add fields without a major
version bump.

Regards,

-- 
  Nicoals George

Attachment: signature.asc
Description: Digital signature

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

Reply via email to