[Libva] mpeg4 decoding

Emil Velikov emil.l.velikov at gmail.com
Sat Nov 8 07:58:06 PST 2014


Hi guys.

Don't mean to be picky or anything but won't this change cause a
non-backward compat ABI/API breakage ?

While adding modulo_time_base might be ok (highly dependant on the
implementation which may use the vop_fields union without sanitising
it), vop_time_increment is definitely going to cause issues.


Cheers,
Emil

On 31/10/14 14:32, Varga, Michael wrote:
> Hi Gwenole,
> 
> I double checked vop_time_increment and its not strictly needed, setting this value to 0 works but if you'll add it I'll use anyway. My patch is below. I declared modulo_time_base with 4 bits, the MPEG4 spec does not specify an upper bound for the size of this variable. If you think this is too big I can reduce it. Also, is there anything you think I should know about your process for submitting patches? Thanks! :)
> 
> 
> From 44aeb5d81789c42404d6a2398ef06699aabc6d73 Mon Sep 17 00:00:00 2001
> From: Michael Varga <Michael.Varga at amd.com>
> Date: Fri, 31 Oct 2014 08:58:34 -0500
> Subject: [PATCH] va: added two variables to VAPictureParameterBufferMPEG4
> 
> Added modulo_time_base and vop_time_increment so the VOP header may be
> reconstructed if it has been truncated.
> 
> Signed-off-by: Michael Varga <Michael.Varga at amd.com>
> ---
>  va/va.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/va/va.h b/va/va.h
> index 01694a9..c21770c 100644
> --- a/va/va.h
> +++ b/va/va.h
> @@ -1312,12 +1312,14 @@ typedef struct _VAPictureParameterBufferMPEG4
>              unsigned int intra_dc_vlc_thr              : 3; 
>              unsigned int top_field_first               : 1; 
>              unsigned int alternate_vertical_scan_flag  : 1; 
> +            unsigned int modulo_time_base              : 4;
>          } bits;
>          unsigned int value;
>      } vop_fields;
>      unsigned char vop_fcode_forward;
>      unsigned char vop_fcode_backward;
>      unsigned short vop_time_increment_resolution;
> +    unsigned short vop_time_increment;
>      /* short header related */
>      unsigned char num_gobs_in_vop;
>      unsigned char num_macroblocks_in_gob;
> 



More information about the Libva mailing list