[FFmpeg-devel] [PATCH][VAAPI][4/6] Add MPEG-4 / H.263 bitstream decoding (take 7)

Michael Niedermayer michaelni
Sun Mar 29 19:30:43 CEST 2009


On Sun, Mar 29, 2009 at 09:31:21AM +0200, Gwenole Beauchesne wrote:
> Le 29 mars 09 ? 04:28, Michael Niedermayer a ?crit :
>
>>> +/** Reconstruct bitstream intra_dc_vlc_thr */
>>> +static int mpeg4_get_intra_dc_vlc_thr(MpegEncContext *s)
>>> +{
>>> +    int v = 0;
>>
>>> +    if (s->shape != 2) { /* video_object_layer_shape != "binary only" */
>>
>> binary only shaps work?
>
> I am only trying to reconstruct the original intra_dc_vlc_thr syntax 
> element in the bitstream. And AFAICS, this is only defined if not binary 
> shape.
>
> That was to save an exra field from MpegEncContext since we don't really 
> have an H263Context to add whatever we want for H.263.

what fails if you remove the check?


>
>>> +    /* Parameters defined by source_format field (Table 6-25) */
>>> +    const int source_format = h263_get_picture_format(s->width, 
>>> s->height);
>>> +    static const uint16_t num_macroblocks_in_gob[8] =
>>> +        { 0, 8, 11, 22, 88, 352, 0, 0 };
>>> +    static const uint8_t num_gobs_in_vop[8] =
>>> +        { 0, 6, 9, 18, 18, 18, 0, 0 };
>>
>> use mb_height/mb_width please or maybe we have a more fitting field
>> i dont remember
>
> What do you mean?

i mean we have a functioning encoder by that all needed parts must exist
already, ive now checked and theres ff_h263_get_gob_height() that seems
what we need. 


[...]
>>> +    memset(&pic_param->sprite_trajectory_du[0], 0, 
>>> sizeof(pic_param->sprite_trajectory_du)); /* XXX: fill */
>>> +    memset(&pic_param->sprite_trajectory_dv[0], 0, 
>>> sizeof(pic_param->sprite_trajectory_dv)); /* XXX: fill */
>>
>> this is not going to work.
>
> Reconstructing from s->sprite_offset/sprite_delta looks hard, so I'd just 
> add new uin16_t h263_sprite_trajectory[4][2] in MpegEncContext, OK?

probably


>
>>> +    pic_param->TRB                                      = 0; /* XXX: 
>>> fill */
>>> +    pic_param->TRD                                      = 0; /* XXX: 
>>> fill */
>>
>> i can only guess what TRB/TRD are supposed to be but 0 is likely not
>> correct
>
> pic_param->TRD = s->picture_structure != PICT_FRAME ? s->pp_field_time : 0;
> pic_param->TRB = s->picture_structure != PICT_FRAME ? s->pb_field_time : 0;
> ?

thats the same as 0

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090329/07fe1096/attachment.pgp>



More information about the ffmpeg-devel mailing list