| 42 | } |
| 43 | |
| 44 | static void hw_base_encode_add_ref(FFHWBaseEncodePicture *pic, |
| 45 | FFHWBaseEncodePicture *target, |
| 46 | int is_ref, int in_dpb, int prev) |
| 47 | { |
| 48 | int refs = 0; |
| 49 | |
| 50 | if (is_ref) { |
| 51 | av_assert0(pic != target); |
| 52 | av_assert0(pic->nb_refs[0] < MAX_PICTURE_REFERENCES && |
| 53 | pic->nb_refs[1] < MAX_PICTURE_REFERENCES); |
| 54 | if (target->display_order < pic->display_order) |
| 55 | pic->refs[0][pic->nb_refs[0]++] = target; |
| 56 | else |
| 57 | pic->refs[1][pic->nb_refs[1]++] = target; |
| 58 | ++refs; |
| 59 | } |
| 60 | |
| 61 | if (in_dpb) { |
| 62 | av_assert0(pic->nb_dpb_pics < MAX_DPB_SIZE); |
| 63 | pic->dpb[pic->nb_dpb_pics++] = target; |
| 64 | ++refs; |
| 65 | } |
| 66 | |
| 67 | if (prev) { |
| 68 | av_assert0(!pic->prev); |
| 69 | pic->prev = target; |
| 70 | ++refs; |
| 71 | } |
| 72 | |
| 73 | target->ref_count[0] += refs; |
| 74 | target->ref_count[1] += refs; |
| 75 | } |
| 76 | |
| 77 | static void hw_base_encode_remove_refs(FFHWBaseEncodePicture *pic, int level) |
| 78 | { |
no outgoing calls
no test coverage detected