On 13/03/13 13:09, Vittorio Giovara wrote:
> ---
>  libavcodec/h264_sei.c   |    7 +++++--
>  libavutil/stereoscopy.c |   16 ++++++++++++++++
>  libavutil/stereoscopy.h |    3 +++
>  3 files changed, 24 insertions(+), 2 deletions(-)
> 

Merge with the previous one.

> diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
> index c47be93..d2dd8c9 100644
> --- a/libavcodec/h264_sei.c
> +++ b/libavcodec/h264_sei.c
> @@ -157,14 +157,16 @@ static int decode_buffering_period(H264Context *h){
>  }
>  
>  static int decode_frame_packing_arrangement(H264Context *h){
> -    int cancel, type, quincunx;
> +    int cancel, quincunx;
> +    int type = -1;
> +    int content = 0;
>  
>      get_ue_golomb(&h->gb);                      // 
> frame_packing_arrangement_id
>      cancel = get_bits1(&h->gb);                 // frame_packing_cancel_flag
>      if (cancel == 0) {
>          type = get_bits(&h->gb, 7);             // 
> frame_packing_arrangement_type
>          quincunx = get_bits1(&h->gb);           // quincunx_sampling_flag
> -        skip_bits(&h->gb, 6);                   // 
> content_interpretation_type
> +        content = get_bits(&h->gb, 6);          // 
> content_interpretation_type
>  
>          // the following skips spatial_flipping_flag frame0_flipped_flag
>          // field_views_flag current_frame_is_frame0_flag
> @@ -178,6 +180,7 @@ static int decode_frame_packing_arrangement(H264Context 
> *h){
>      }
>      skip_bits1(&h->gb);                         // 
> frame_packing_arrangement_extension_flag
>  
> +    avstereo_h264(&h->avctx->stereo_info, type, content);
>      return 0;
>  }
>  
> diff --git a/libavutil/stereoscopy.c b/libavutil/stereoscopy.c
> index 10dc810..646b267 100644
> --- a/libavutil/stereoscopy.c
> +++ b/libavutil/stereoscopy.c
> @@ -9,3 +9,19 @@ void avstereo_init(AVStereo *s)
>      s->fullsize = 0;
>  }
>  
> +void avstereo_h264(AVStereo *s, int type, int content)
> +{
> +    switch (type) {
> +        case 0: s->type = STEREO_CHECKERS; break;
> +        case 1: s->type = STEREO_LINES; break;
> +        case 2: s->type = STEREO_COLUMNS; break;
> +        case 3: s->type = STEREO_SIDEBYSIDE; break;
> +        case 4: s->type = STEREO_TOPBOTTOM; break;
> +        case 5: s->type = STEREO_FRAMESEQUENCE; break;
> +    }
> +    if (content == 1)
> +        s->order = ORDER_LR;
> +    else if (content == 2)
> +        s->order = ORDER_RL;
> +}

use the avpriv namespace if the function isn't public and you want to
share it across avcodec and avformat, currently looks like it should
stay private and in h264_sei.


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

Reply via email to