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

Martin Zlomek martin.zlomek
Sat Sep 22 10:03:51 CEST 2007


@@ -3064,10 +3065,14 @@
                          if(reordering_of_pic_nums_idc == 0) pred-=  
abs_diff_pic_num;
                          else                                pred+=  
abs_diff_pic_num;
                          pred &= h->max_pic_num - 1;
+
+                        pic_num = pred;
+                        if (pic_num > h->curr_pic_num)
+                            pic_num -= h->max_pic_num;

                          if (FIELD_PICTURE) {
-                            frame_num = pred >> 1;
-                            if (pred & 1) {
+                            frame_num = pic_num >> 1;
+                            if (pic_num & 1) {
                                  pic_structure = s->picture_structure;
                                  add = (s->picture_structure ==  
PICT_BOTTOM_FIELD);
                              } else {

Well, "pic_num -= h->max_pic_num;" should be applied after
"frame_num = pic_num >> 1;" because frame_num should not have
negative value if pic_num has...


-- 
Martin Zlomek
martin.zlomek at email.cz




More information about the ffmpeg-devel mailing list