Mercurial > mplayer.hg
comparison libmpcodecs/pullup.c @ 13235:bc7cb8cf36b2
strictness level -1 to 'almost' ignore breaks
author | rfelker |
---|---|
date | Fri, 03 Sep 2004 00:08:58 +0000 |
parents | 7056d7cfcd02 |
children | 821f464b4d90 |
comparison
equal
deleted
inserted
replaced
13234:7056d7cfcd02 | 13235:bc7cb8cf36b2 |
---|---|
478 { | 478 { |
479 struct pullup_field *f0 = c->first; | 479 struct pullup_field *f0 = c->first; |
480 struct pullup_field *f1 = f0->next; | 480 struct pullup_field *f1 = f0->next; |
481 struct pullup_field *f2 = f1->next; | 481 struct pullup_field *f2 = f1->next; |
482 struct pullup_field *f3 = f2->next; | 482 struct pullup_field *f3 = f2->next; |
483 int l; | |
483 | 484 |
484 if (queue_length(c->first, c->last) < 6) return 0; | 485 if (queue_length(c->first, c->last) < 6) return 0; |
485 foo(c); | 486 foo(c); |
486 | 487 |
487 if (f0->affinity == -1) return 1; | 488 if (f0->affinity == -1) return 1; |
488 | 489 |
489 switch (find_first_break(f0, 3)) { | 490 l = find_first_break(f0, 3); |
491 if (l == 1 && c->strict_breaks < 0) l = 0; | |
492 | |
493 switch (l) { | |
490 case 1: | 494 case 1: |
491 if (!c->strict_breaks && f0->affinity == 1 && f1->affinity == -1) | 495 if (c->strict_breaks > 0 && f0->affinity == 1 && f1->affinity == -1) |
492 return 2; | 496 return 2; |
493 else return 1; | 497 else return 1; |
494 case 2: | 498 case 2: |
495 /* FIXME: strictly speaking, f0->prev is no longer valid... :) */ | 499 /* FIXME: strictly speaking, f0->prev is no longer valid... :) */ |
496 if (c->strict_pairs | 500 if (c->strict_pairs |