Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/vc1dec: Fix vc1_hwaccel_pixfmt_list_420
@ 2024-02-11  7:28 Akihiko Odaki
  2024-02-11  7:36 ` Andreas Rheinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Akihiko Odaki @ 2024-02-11  7:28 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Akihiko Odaki

vc1_hwaccel_pixfmt_list_420 is referenced even if
!(CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER) so move it out
of the #if block.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 libavcodec/vc1dec.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e71b92eef8..3ca478e82a 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -51,27 +51,6 @@
 #include "libavutil/thread.h"
 
 
-#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
-
-typedef struct SpriteData {
-    /**
-     * Transform coefficients for both sprites in 16.16 fixed point format,
-     * in the order they appear in the bitstream:
-     *  x scale
-     *  rotation 1 (unused)
-     *  x offset
-     *  rotation 2 (unused)
-     *  y scale
-     *  y offset
-     *  alpha
-     */
-    int coefs[2][7];
-
-    int effect_type, effect_flag;
-    int effect_pcount1, effect_pcount2;   ///< amount of effect parameters stored in effect_params
-    int effect_params1[15], effect_params2[10]; ///< effect parameters in 16.16 fixed point format
-} SpriteData;
-
 static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
 #if CONFIG_VC1_DXVA2_HWACCEL
     AV_PIX_FMT_DXVA2_VLD,
@@ -96,6 +75,27 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
     AV_PIX_FMT_NONE
 };
 
+#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
+
+typedef struct SpriteData {
+    /**
+     * Transform coefficients for both sprites in 16.16 fixed point format,
+     * in the order they appear in the bitstream:
+     *  x scale
+     *  rotation 1 (unused)
+     *  x offset
+     *  rotation 2 (unused)
+     *  y scale
+     *  y offset
+     *  alpha
+     */
+    int coefs[2][7];
+
+    int effect_type, effect_flag;
+    int effect_pcount1, effect_pcount2;   ///< amount of effect parameters stored in effect_params
+    int effect_params1[15], effect_params2[10]; ///< effect parameters in 16.16 fixed point format
+} SpriteData;
+
 static inline int get_fp_val(GetBitContext* gb)
 {
     return (get_bits_long(gb, 30) - (1 << 29)) << 1;

---
base-commit: 81c2557691b12ceb79b3ba92aa496f2301ab4d18
change-id: 20240210-vc1dec-dc6d7b31f795

Best regards,
-- 
Akihiko Odaki <akihiko.odaki@gmail.com>

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/vc1dec: Fix vc1_hwaccel_pixfmt_list_420
  2024-02-11  7:28 [FFmpeg-devel] [PATCH] avcodec/vc1dec: Fix vc1_hwaccel_pixfmt_list_420 Akihiko Odaki
@ 2024-02-11  7:36 ` Andreas Rheinhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-02-11  7:36 UTC (permalink / raw)
  To: ffmpeg-devel

Akihiko Odaki:
> vc1_hwaccel_pixfmt_list_420 is referenced even if
> !(CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER) so move it out
> of the #if block.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> ---
>  libavcodec/vc1dec.c | 42 +++++++++++++++++++++---------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index e71b92eef8..3ca478e82a 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -51,27 +51,6 @@
>  #include "libavutil/thread.h"
>  
>  
> -#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
> -
> -typedef struct SpriteData {
> -    /**
> -     * Transform coefficients for both sprites in 16.16 fixed point format,
> -     * in the order they appear in the bitstream:
> -     *  x scale
> -     *  rotation 1 (unused)
> -     *  x offset
> -     *  rotation 2 (unused)
> -     *  y scale
> -     *  y offset
> -     *  alpha
> -     */
> -    int coefs[2][7];
> -
> -    int effect_type, effect_flag;
> -    int effect_pcount1, effect_pcount2;   ///< amount of effect parameters stored in effect_params
> -    int effect_params1[15], effect_params2[10]; ///< effect parameters in 16.16 fixed point format
> -} SpriteData;
> -
>  static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
>  #if CONFIG_VC1_DXVA2_HWACCEL
>      AV_PIX_FMT_DXVA2_VLD,
> @@ -96,6 +75,27 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
>      AV_PIX_FMT_NONE
>  };
>  
> +#if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
> +
> +typedef struct SpriteData {
> +    /**
> +     * Transform coefficients for both sprites in 16.16 fixed point format,
> +     * in the order they appear in the bitstream:
> +     *  x scale
> +     *  rotation 1 (unused)
> +     *  x offset
> +     *  rotation 2 (unused)
> +     *  y scale
> +     *  y offset
> +     *  alpha
> +     */
> +    int coefs[2][7];
> +
> +    int effect_type, effect_flag;
> +    int effect_pcount1, effect_pcount2;   ///< amount of effect parameters stored in effect_params
> +    int effect_params1[15], effect_params2[10]; ///< effect parameters in 16.16 fixed point format
> +} SpriteData;
> +
>  static inline int get_fp_val(GetBitContext* gb)
>  {
>      return (get_bits_long(gb, 30) - (1 << 29)) << 1;
> 
> ---
> base-commit: 81c2557691b12ceb79b3ba92aa496f2301ab4d18
> change-id: 20240210-vc1dec-dc6d7b31f795
> 
> Best regards,

LGTM. Sorry for that, I didn't realize that this block was #if'ed.
Will apply.

- Andreas

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-11  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11  7:28 [FFmpeg-devel] [PATCH] avcodec/vc1dec: Fix vc1_hwaccel_pixfmt_list_420 Akihiko Odaki
2024-02-11  7:36 ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git