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 <[email protected]> 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 <[email protected]> --- 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; -- 1.9.1 ________________________________________ From: Gwenole Beauchesne [[email protected]] Sent: Friday, October 31, 2014 1:54 AM To: Varga, Michael Cc: [email protected] Subject: Re: [Libva] mpeg4 decoding Hi Michael, 2014-10-30 16:37 GMT+01:00 Varga, Michael <[email protected]>: > Hello, > > I am working to implement VAAPI mpeg4 decoding in MESA. I am currently > trying to remedy a scenario where the VideoObjectPlane() (VOP) header is > truncated from the input slice data. If the VOP header is truncated I need > to regenerate it and add it to the front of the bitstream. It would appear > one variable is missing from "VAPictureParameterBufferMPEG4" to generate the > VOP header, the variable "modulo_time_base". I have seen a hacky method for > generating this variable but I think it would be better to pass it in using > the struct "VAPictureParameterBufferMPEG4". Would you be willing to add this > variable? Could you please review all the new fields you need and validate on the changed structs? i.e. I'd prefer adding more fields at once, rather than going piecemal. :) In particular, I believe you would also need the actual vop_time_increment bits, right? Thanks, -- Gwenole Beauchesne Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France Registration Number (RCS): Nanterre B 302 456 199 _______________________________________________ Libva mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libva
