Unified · Split
| @@ -25,6 +25,12 @@ · 24 unmodified lines | ||
| 25 | 25 | #define MAX_ASYNC_DEPTH 64 |
| 26 | 26 | #define MAX_REFERENCE_LIST_NUM 2 |
| 27 | 27 | |
| 28 | +static inline const char *ff_hw_base_encode_get_pictype_name(const int type) | |
| 29 | +{ | |
| 30 | + const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; | |
| 31 | + return picture_type_name[type]; | |
| 32 | +} | |
| 33 | + | |
| 28 | 34 | enum { |
| 29 | 35 | FF_HW_PICTURE_TYPE_IDR = 0, |
| 30 | 36 | FF_HW_PICTURE_TYPE_I = 1, |
| @@ -38,8 +38,6 @@ const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[] = { · 37 unmodified lines | ||
| 38 | 38 | NULL, |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | −static const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; | |
| 42 | − | |
| 43 | 41 | static int vaapi_encode_make_packed_header(AVCodecContext *avctx, |
| 44 | 42 | VAAPIEncodePicture *pic, |
| 45 | 43 | int type, char *data, size_t bit_len) |
| @@ -277,7 +275,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx, · 231 unmodified lines | ||
| 277 | 275 | |
| 278 | 276 | av_log(avctx, AV_LOG_DEBUG, "Issuing encode for pic %"PRId64"/%"PRId64" " |
| 279 | 277 | "as type %s.\n", pic->display_order, pic->encode_order, |
| 280 | − picture_type_name[pic->type]); | |
| 278 | + ff_hw_base_encode_get_pictype_name(pic->type)); | |
| 281 | 279 | if (pic->nb_refs[0] == 0 && pic->nb_refs[1] == 0) { |
| 282 | 280 | av_log(avctx, AV_LOG_DEBUG, "No reference pictures.\n"); |
| 283 | 281 | } else { |