History

avcodec/vaapi_encode: add picture type name to base

Tong Wu committed 2 years ago

Commit dea52041 parent ff063432 files · +7 −3Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/hw_base_encode.h +6 −0
  2. libavcodec/vaapi_encode.c +1 −3
libavcodec/hw_base_encode.h+6−0
@@ -25,6 +25,12 @@ · 24 unmodified lines
25#define MAX_ASYNC_DEPTH 6425#define MAX_ASYNC_DEPTH 64
26#define MAX_REFERENCE_LIST_NUM 226#define MAX_REFERENCE_LIST_NUM 2
27 27
28static 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
28enum {34enum {
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,
libavcodec/vaapi_encode.c+1−3
@@ -38,8 +38,6 @@ const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[] = { · 37 unmodified lines
38 NULL,38 NULL,
39};39};
40 40
41static const char * const picture_type_name[] = { "IDR", "I", "P", "B" };
42
43static int vaapi_encode_make_packed_header(AVCodecContext *avctx,41static 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 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t