Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -25,6 +25,12 @@ · 24 unmodified lines | |||
| 25 | #define MAX_ASYNC_DEPTH 64 | 25 | #define MAX_ASYNC_DEPTH 64 |
| 26 | #define MAX_REFERENCE_LIST_NUM 2 | 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 | enum { | 34 | enum { |
| 29 | FF_HW_PICTURE_TYPE_IDR = 0, | 35 | FF_HW_PICTURE_TYPE_IDR = 0, |
| 30 | FF_HW_PICTURE_TYPE_I = 1, | 36 | FF_HW_PICTURE_TYPE_I = 1, |
| @@ -38,8 +38,6 @@ const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[] = { · 37 unmodified lines | |||
| 38 | NULL, | 38 | NULL, |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | static const char * const picture_type_name[] = { "IDR", "I", "P", "B" }; | ||
| 42 | |||
| 43 | static int vaapi_encode_make_packed_header(AVCodecContext *avctx, | 41 | static int vaapi_encode_make_packed_header(AVCodecContext *avctx, |
| 44 | VAAPIEncodePicture *pic, | 42 | VAAPIEncodePicture *pic, |
| 45 | int type, char *data, size_t bit_len) | 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 | av_log(avctx, AV_LOG_DEBUG, "Issuing encode for pic %"PRId64"/%"PRId64" " | 276 | av_log(avctx, AV_LOG_DEBUG, "Issuing encode for pic %"PRId64"/%"PRId64" " |
| 279 | "as type %s.\n", pic->display_order, pic->encode_order, | 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 | if (pic->nb_refs[0] == 0 && pic->nb_refs[1] == 0) { | 279 | if (pic->nb_refs[0] == 0 && pic->nb_refs[1] == 0) { |
| 282 | av_log(avctx, AV_LOG_DEBUG, "No reference pictures.\n"); | 280 | av_log(avctx, AV_LOG_DEBUG, "No reference pictures.\n"); |
| 283 | } else { | 281 | } else { |