Re: [FFmpeg-devel] [PATCH 1/8] lavc: Rename hwaccel.h to hwconfig.h

2020-04-26 Thread Mark Thompson
On 19/04/2020 15:21, Zhong Li wrote:
> Mark Thompson  于2020年4月13日周一 下午11:34写道:
>>
>> All of these encoders can accept libmfx surfaces directly in a hardware
>> frames context, or they can accept software frames if a suitable device
>> is supplied to use.
>> ---
>>  libavcodec/qsvenc.c   | 7 +++
>>  libavcodec/qsvenc.h   | 3 +++
>>  libavcodec/qsvenc_h264.c  | 1 +
>>  libavcodec/qsvenc_hevc.c  | 1 +
>>  libavcodec/qsvenc_jpeg.c  | 1 +
>>  libavcodec/qsvenc_mpeg2.c | 1 +
>>  libavcodec/qsvenc_vp9.c   | 1 +
>>  7 files changed, 15 insertions(+)
>>
>>...
> 
> LGTM
> 
On 23/04/2020 10:22, Lynne wrote:
> Apr 13, 2020, 16:33 by s...@jkqxz.net:
> 
>> This already applied to decoders as well as hwaccels, and adding encoder
>> support was going to make the name even more inaccurate.
>> ---
>>  libavcodec/cuviddec.c| 2 +-
>>  libavcodec/decode.c  | 2 +-
>>  libavcodec/h263dec.c | 2 +-
>>  libavcodec/h264dec.c | 2 +-
>>  libavcodec/hevcdec.c | 2 +-
>>  libavcodec/{hwaccel.h => hwconfig.h} | 6 +++---
>>  libavcodec/mediacodecdec.c   | 2 +-
>>  libavcodec/mjpegdec.c| 2 +-
>>  libavcodec/mmaldec.c | 2 +-
>>  libavcodec/mpeg12dec.c   | 2 +-
>>  libavcodec/mpeg4videodec.c   | 2 +-
>>  libavcodec/pthread_frame.c   | 2 +-
>>  libavcodec/qsvdec.h  | 2 +-
>>  libavcodec/rkmppdec.c| 2 +-
>>  libavcodec/utils.c   | 2 +-
>>  libavcodec/vaapi_h264.c  | 2 +-
>>  libavcodec/vaapi_hevc.c  | 2 +-
>>  libavcodec/vaapi_mjpeg.c | 2 +-
>>  libavcodec/vaapi_mpeg2.c | 2 +-
>>  libavcodec/vaapi_mpeg4.c | 2 +-
>>  libavcodec/vaapi_vc1.c   | 2 +-
>>  libavcodec/vaapi_vp8.c   | 2 +-
>>  libavcodec/vaapi_vp9.c   | 2 +-
>>  libavcodec/vc1dec.c  | 2 +-
>>  libavcodec/vdpau_h264.c  | 2 +-
>>  libavcodec/vdpau_hevc.c  | 2 +-
>>  libavcodec/vdpau_mpeg12.c| 2 +-
>>  libavcodec/vdpau_mpeg4.c | 2 +-
>>  libavcodec/vdpau_vc1.c   | 2 +-
>>  libavcodec/vdpau_vp9.c   | 2 +-
>>  libavcodec/vp8.c | 2 +-
>>  libavcodec/vp9.c | 2 +-
>>  32 files changed, 34 insertions(+), 34 deletions(-)
>>  rename libavcodec/{hwaccel.h => hwconfig.h} (97%)
>>
> 
> patchset reviewed, LGTM
> I can't believe this hasn't been implemented yet. The only way to guess what 
> the encoder needs
> currently is by tokenizing the name with an underscore and giving the last 
> part to av_hwdevice_find_type_by_name, and av_get_pix_fmt, which is beyond 
> ridiculous and fragile.
> 
> I kind of need this, so could you push this soon? Its already been 10 days on 
> the ML.

Applied, except the NVENC part which I can't test.

Thanks,

- Mark
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/8] lavc: Rename hwaccel.h to hwconfig.h

2020-04-23 Thread Lynne
Apr 13, 2020, 16:33 by s...@jkqxz.net:

> This already applied to decoders as well as hwaccels, and adding encoder
> support was going to make the name even more inaccurate.
> ---
>  libavcodec/cuviddec.c| 2 +-
>  libavcodec/decode.c  | 2 +-
>  libavcodec/h263dec.c | 2 +-
>  libavcodec/h264dec.c | 2 +-
>  libavcodec/hevcdec.c | 2 +-
>  libavcodec/{hwaccel.h => hwconfig.h} | 6 +++---
>  libavcodec/mediacodecdec.c   | 2 +-
>  libavcodec/mjpegdec.c| 2 +-
>  libavcodec/mmaldec.c | 2 +-
>  libavcodec/mpeg12dec.c   | 2 +-
>  libavcodec/mpeg4videodec.c   | 2 +-
>  libavcodec/pthread_frame.c   | 2 +-
>  libavcodec/qsvdec.h  | 2 +-
>  libavcodec/rkmppdec.c| 2 +-
>  libavcodec/utils.c   | 2 +-
>  libavcodec/vaapi_h264.c  | 2 +-
>  libavcodec/vaapi_hevc.c  | 2 +-
>  libavcodec/vaapi_mjpeg.c | 2 +-
>  libavcodec/vaapi_mpeg2.c | 2 +-
>  libavcodec/vaapi_mpeg4.c | 2 +-
>  libavcodec/vaapi_vc1.c   | 2 +-
>  libavcodec/vaapi_vp8.c   | 2 +-
>  libavcodec/vaapi_vp9.c   | 2 +-
>  libavcodec/vc1dec.c  | 2 +-
>  libavcodec/vdpau_h264.c  | 2 +-
>  libavcodec/vdpau_hevc.c  | 2 +-
>  libavcodec/vdpau_mpeg12.c| 2 +-
>  libavcodec/vdpau_mpeg4.c | 2 +-
>  libavcodec/vdpau_vc1.c   | 2 +-
>  libavcodec/vdpau_vp9.c   | 2 +-
>  libavcodec/vp8.c | 2 +-
>  libavcodec/vp9.c | 2 +-
>  32 files changed, 34 insertions(+), 34 deletions(-)
>  rename libavcodec/{hwaccel.h => hwconfig.h} (97%)
>

patchset reviewed, LGTM
I can't believe this hasn't been implemented yet. The only way to guess what 
the encoder needs
currently is by tokenizing the name with an underscore and giving the last part 
to av_hwdevice_find_type_by_name, and av_get_pix_fmt, which is beyond 
ridiculous and fragile.

I kind of need this, so could you push this soon? Its already been 10 days on 
the ML.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/8] lavc: Rename hwaccel.h to hwconfig.h

2020-04-13 Thread Mark Thompson
This already applied to decoders as well as hwaccels, and adding encoder
support was going to make the name even more inaccurate.
---
 libavcodec/cuviddec.c| 2 +-
 libavcodec/decode.c  | 2 +-
 libavcodec/h263dec.c | 2 +-
 libavcodec/h264dec.c | 2 +-
 libavcodec/hevcdec.c | 2 +-
 libavcodec/{hwaccel.h => hwconfig.h} | 6 +++---
 libavcodec/mediacodecdec.c   | 2 +-
 libavcodec/mjpegdec.c| 2 +-
 libavcodec/mmaldec.c | 2 +-
 libavcodec/mpeg12dec.c   | 2 +-
 libavcodec/mpeg4videodec.c   | 2 +-
 libavcodec/pthread_frame.c   | 2 +-
 libavcodec/qsvdec.h  | 2 +-
 libavcodec/rkmppdec.c| 2 +-
 libavcodec/utils.c   | 2 +-
 libavcodec/vaapi_h264.c  | 2 +-
 libavcodec/vaapi_hevc.c  | 2 +-
 libavcodec/vaapi_mjpeg.c | 2 +-
 libavcodec/vaapi_mpeg2.c | 2 +-
 libavcodec/vaapi_mpeg4.c | 2 +-
 libavcodec/vaapi_vc1.c   | 2 +-
 libavcodec/vaapi_vp8.c   | 2 +-
 libavcodec/vaapi_vp9.c   | 2 +-
 libavcodec/vc1dec.c  | 2 +-
 libavcodec/vdpau_h264.c  | 2 +-
 libavcodec/vdpau_hevc.c  | 2 +-
 libavcodec/vdpau_mpeg12.c| 2 +-
 libavcodec/vdpau_mpeg4.c | 2 +-
 libavcodec/vdpau_vc1.c   | 2 +-
 libavcodec/vdpau_vp9.c   | 2 +-
 libavcodec/vp8.c | 2 +-
 libavcodec/vp9.c | 2 +-
 32 files changed, 34 insertions(+), 34 deletions(-)
 rename libavcodec/{hwaccel.h => hwconfig.h} (97%)

diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index 50dc8956c3..9477b8fd3a 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -33,7 +33,7 @@
 
 #include "avcodec.h"
 #include "decode.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "nvdec.h"
 #include "internal.h"
 
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index b7ae1fbb84..2625790b57 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -41,7 +41,7 @@
 #include "avcodec.h"
 #include "bytestream.h"
 #include "decode.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "internal.h"
 #include "thread.h"
 
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 8ee844e298..31ac563f43 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -33,7 +33,7 @@
 #include "flv.h"
 #include "h263.h"
 #include "h263_parser.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "internal.h"
 #include "mpeg_er.h"
 #include "mpeg4video.h"
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index e374f32e91..4c355feb18 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -46,7 +46,7 @@
 #include "h264_mvpred.h"
 #include "h264_ps.h"
 #include "golomb.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "mathops.h"
 #include "me_cmp.h"
 #include "mpegutils.h"
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 36be83948e..78299f4b32 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -41,7 +41,7 @@
 #include "hevc_data.h"
 #include "hevc_parse.h"
 #include "hevcdec.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "profiles.h"
 
 const uint8_t ff_hevc_pel_weight[65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, 
[12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 };
diff --git a/libavcodec/hwaccel.h b/libavcodec/hwconfig.h
similarity index 97%
rename from libavcodec/hwaccel.h
rename to libavcodec/hwconfig.h
index 3aaa92571c..4199ffdd50 100644
--- a/libavcodec/hwaccel.h
+++ b/libavcodec/hwconfig.h
@@ -16,8 +16,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_HWACCEL_H
-#define AVCODEC_HWACCEL_H
+#ifndef AVCODEC_HWCONFIG_H
+#define AVCODEC_HWCONFIG_H
 
 #include "avcodec.h"
 #include "hwaccels.h"
@@ -81,4 +81,4 @@ typedef struct AVCodecHWConfigInternal {
 #define HWACCEL_XVMC(codec) \
 HW_CONFIG_HWACCEL(0, 0, 1, XVMC, NONE, ff_ ## codec ## 
_xvmc_hwaccel)
 
-#endif /* AVCODEC_HWACCEL_H */
+#endif /* AVCODEC_HWCONFIG_H */
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index f5771bffb1..25410021e8 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -34,7 +34,7 @@
 #include "decode.h"
 #include "h264_parse.h"
 #include "hevc_parse.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "internal.h"
 #include "mediacodec_wrapper.h"
 #include "mediacodecdec_common.h"
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index d5e7c21610..cb5e2a9b9b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -36,7 +36,7 @@
 #include "avcodec.h"
 #include "blockdsp.h"
 #include "copy_block.h"
-#include "hwaccel.h"
+#include "hwconfig.h"
 #include "idctdsp.h"
 #include "internal.h"
 #include "jpegtables.h"
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
in