| 75 | } |
| 76 | |
| 77 | static void hw_base_encode_remove_refs(FFHWBaseEncodePicture *pic, int level) |
| 78 | { |
| 79 | int i; |
| 80 | |
| 81 | if (pic->ref_removed[level]) |
| 82 | return; |
| 83 | |
| 84 | for (i = 0; i < pic->nb_refs[0]; i++) { |
| 85 | av_assert0(pic->refs[0][i]); |
| 86 | --pic->refs[0][i]->ref_count[level]; |
| 87 | av_assert0(pic->refs[0][i]->ref_count[level] >= 0); |
| 88 | } |
| 89 | |
| 90 | for (i = 0; i < pic->nb_refs[1]; i++) { |
| 91 | av_assert0(pic->refs[1][i]); |
| 92 | --pic->refs[1][i]->ref_count[level]; |
| 93 | av_assert0(pic->refs[1][i]->ref_count[level] >= 0); |
| 94 | } |
| 95 | |
| 96 | for (i = 0; i < pic->nb_dpb_pics; i++) { |
| 97 | av_assert0(pic->dpb[i]); |
| 98 | --pic->dpb[i]->ref_count[level]; |
| 99 | av_assert0(pic->dpb[i]->ref_count[level] >= 0); |
| 100 | } |
| 101 | |
| 102 | av_assert0(pic->prev || pic->type == FF_HW_PICTURE_TYPE_IDR); |
| 103 | if (pic->prev) { |
| 104 | --pic->prev->ref_count[level]; |
| 105 | av_assert0(pic->prev->ref_count[level] >= 0); |
| 106 | } |
| 107 | |
| 108 | pic->ref_removed[level] = 1; |
| 109 | } |
| 110 | |
| 111 | static void hw_base_encode_set_b_pictures(FFHWBaseEncodeContext *ctx, |
| 112 | FFHWBaseEncodePicture *start, |
no outgoing calls
no test coverage detected