[FFmpeg-devel] [PATCH] lavc: Replace 181 magic number with ITU_T_T35_COUNTRY_CODE_US

Michael Niedermayer michael at niedermayer.cc
Wed Mar 5 00:57:14 EET 2025


On Tue, Mar 04, 2025 at 10:12:40AM +0100, Tomas Härdin wrote:
[...]

>  atsc_a53.c           |    2 +-
>  vaapi_encode_h264.c  |   18 ++++++++----------
>  vaapi_encode_h265.c  |   21 +++++++++------------
>  vulkan_encode_h264.c |   17 +++++++----------
>  vulkan_encode_h265.c |   15 ++++++---------
>  5 files changed, 31 insertions(+), 42 deletions(-)
> a03eaa9f20ddb526f7aaaa1c79b7bb5fdc01c86c  0002-lavc-Sort-some-includes.patch
> From b9dacc4d5d01f059cb6ec886d278f6126245b1f5 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git at haerdin.se>
> Date: Tue, 4 Mar 2025 10:10:27 +0100
> Subject: [PATCH 2/2] lavc: Sort some includes
> 
> ---
>  libavcodec/atsc_a53.c           |  2 +-
>  libavcodec/vaapi_encode_h264.c  | 18 ++++++++----------
>  libavcodec/vaapi_encode_h265.c  | 21 +++++++++------------
>  libavcodec/vulkan_encode_h264.c | 17 +++++++----------
>  libavcodec/vulkan_encode_h265.c | 15 ++++++---------
>  5 files changed, 31 insertions(+), 42 deletions(-)

this breaks build

In file included from libavcodec/vaapi_encode_h265.c:20:
/usr/include/va/va_enc_hevc.h:91:35: error: ‘VAEncPackedHeaderSequence’ undeclared here (not in a function)
   91 |     VAEncPackedHeaderHEVC_VPS   = VAEncPackedHeaderSequence,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:109:35: error: ‘VAEncPackedHeaderPicture’ undeclared here (not in a function); did you mean ‘VAEncPackedHeaderHEVC_SPS’?
  109 |     VAEncPackedHeaderHEVC_PPS   = VAEncPackedHeaderPicture,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                   VAEncPackedHeaderHEVC_SPS
/usr/include/va/va_enc_hevc.h:122:35: error: ‘VAEncPackedHeaderSlice’ undeclared here (not in a function); did you mean ‘VAEncPackedHeaderHEVC_PPS’?
  122 |     VAEncPackedHeaderHEVC_Slice = VAEncPackedHeaderSlice,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                   VAEncPackedHeaderHEVC_PPS
/usr/include/va/va_enc_hevc.h:137:32: error: expected ‘,’ or ‘}’ before ‘va_deprecated_enum’
  137 |     VAEncPackedHeaderHEVC_SEI  va_deprecated_enum = (0x80000000 | 1),
      |                                ^~~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:331:41: error: ‘VA_PADDING_MEDIUM’ undeclared here (not in a function)
  331 |     uint32_t                va_reserved[VA_PADDING_MEDIUM];
      |                                         ^~~~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:368:5: error: unknown type name ‘VAPictureHEVC’
  368 |     VAPictureHEVC   decoded_curr_pic;
      |     ^~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:377:5: error: unknown type name ‘VAPictureHEVC’
  377 |     VAPictureHEVC   reference_frames[15];
      |     ^~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:385:5: error: unknown type name ‘VABufferID’
  385 |     VABufferID      coded_buf;
      |     ^~~~~~~~~~
/usr/include/va/va_enc_hevc.h:543:41: error: ‘VA_PADDING_HIGH’ undeclared here (not in a function)
  543 |     uint32_t                va_reserved[VA_PADDING_HIGH - 1];
      |                                         ^~~~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:585:5: error: unknown type name ‘VAPictureHEVC’
  585 |     VAPictureHEVC   ref_pic_list0[15];
      |     ^~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:587:5: error: unknown type name ‘VAPictureHEVC’
  587 |     VAPictureHEVC   ref_pic_list1[15];
      |     ^~~~~~~~~~~~~
/usr/include/va/va_enc_hevc.h:727:41: error: ‘VA_PADDING_LOW’ undeclared here (not in a function)
  727 |     uint32_t                va_reserved[VA_PADDING_LOW];
      |                                         ^~~~~~~~~~~~~~

...

libavcodec/vaapi_encode_h264.c: In function ‘vaapi_encode_h264_init_slice_params’:
libavcodec/vaapi_encode_h264.c:847:31: error: request for member ‘picture_id’ in something not a structure or union
  847 |         vslice->RefPicList0[i].picture_id = VA_INVALID_ID;
      |                               ^
libavcodec/vaapi_encode_h264.c:848:31: error: request for member ‘flags’ in something not a structure or union
  848 |         vslice->RefPicList0[i].flags      = VA_PICTURE_H264_INVALID;
      |                               ^
libavcodec/vaapi_encode_h264.c:849:31: error: request for member ‘picture_id’ in something not a structure or union
  849 |         vslice->RefPicList1[i].picture_id = VA_INVALID_ID;
      |                               ^
libavcodec/vaapi_encode_h264.c:850:31: error: request for member ‘flags’ in something not a structure or union
  850 |         vslice->RefPicList1[i].flags      = VA_PICTURE_H264_INVALID;
      |                               ^
make: *** [ffbuild/common.mak:81: libavcodec/vaapi_encode_h265.o] Error 1
make: *** [ffbuild/common.mak:81: libavcodec/vaapi_encode_h264.o] Error 1
make: Target 'all' not remade because of errors.

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250304/f9b9f2d1/attachment.sig>


More information about the ffmpeg-devel mailing list