[FFmpeg-devel] [PATCH] Implement PAFF in H.264

Jeff Downs heydowns
Thu Oct 4 16:41:17 CEST 2007


On Thu, 4 Oct 2007, Michael Niedermayer wrote:
[...]

> very nicely split :)
> i dont remember that anyone splited a patch like that lately ...

Thanks. I'm trying!

[...]

> > Content-Description: Patch 6: currpicnum
> 
> likely ok
> 

To further reinforce -

Page 93 of the ITU (free) PDF version of the spec:

The variable CurrPicNum is derived as follows.
 If field_pic_flag is equal to 0, CurrPicNum is set equal to frame_num. 
 Otherwise (field_pic_flag is equal to 1), CurrPicNum is set equal to 2 * 
 frame_num + 1.

We only use curr_pic_num in picture reordering (and, in later paff patch, 
for mmco) and the calculations its based on are pretty much straight from 
spec.

[...]

> > +static int split_field_half_ref_list(Picture *dest, int dest_len,
> > +                                     Picture *src,  int src_len,  int parity){
[...]
> 
> i think the variables could be named better, especially "i" is not a
> good name here

Sure. i -> field_output. same->same_parity. I kept xxx_i; similar is used 
elsewhere in the existing code.
Revised paff-defreflist.patch (and indent fixer) attached.

 
> > +static int pic_num_extract(H264Context *h, int pic_num, int *structure){
[...]
> 
> *structure = s->picture_structure;
> if(FIELD_PICTURE){
>     if(!(pic_num & 1))
>         *structure ^= 3;
>     pic_num >>=1;
> }
> return pic_num;

Indeed, thanks. 
Incorporated and revised paff-reorder.patch attached.

> remaining patch not reviewed (ill review it tomorrow unless you want to
> split it further)

I'll continue to split as I have time, given how productive this round 
was.

	-Jeff




More information about the ffmpeg-devel mailing list