[FFmpeg-devel] avcodec/cfhd: add back alpha processing removed in 9cefb9e7ec

Submitted by Paul B Mahol on June 29, 2019, 7:08 a.m.

Details

Message ID 20190629070841.15241-1-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol June 29, 2019, 7:08 a.m.
Fixes #7886.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/cfhd.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kieran Kunhya June 29, 2019, 9:15 a.m.
On Sat, 29 Jun 2019 at 08:09, Paul B Mahol <onemda@gmail.com> wrote:

> Fixes #7886.
>
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavcodec/cfhd.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
> index 846d334b9b..49a5a2c30a 100644
> --- a/libavcodec/cfhd.c
> +++ b/libavcodec/cfhd.c
> @@ -884,6 +884,8 @@ static int cfhd_decode(AVCodecContext *avctx, void
> *data, int *got_frame,
>              high = s->plane[plane].l_h[7];
>              for (i = 0; i < lowpass_height * 2; i++) {
>                  horiz_filter_clip(dst, low, high, lowpass_width, s->bpc);
> +                if (avctx->pix_fmt == AV_PIX_FMT_GBRAP12 && act_plane ==
> 3)
> +                    process_alpha(dst, lowpass_width * 2);
>                  low  += lowpass_width;
>                  high += lowpass_width;
>                  dst  += pic->linesize[act_plane] / 2;
> --
> 2.17.1
>

LGTM

Patch hide | download patch | download mbox

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 846d334b9b..49a5a2c30a 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -884,6 +884,8 @@  static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
             high = s->plane[plane].l_h[7];
             for (i = 0; i < lowpass_height * 2; i++) {
                 horiz_filter_clip(dst, low, high, lowpass_width, s->bpc);
+                if (avctx->pix_fmt == AV_PIX_FMT_GBRAP12 && act_plane == 3)
+                    process_alpha(dst, lowpass_width * 2);
                 low  += lowpass_width;
                 high += lowpass_width;
                 dst  += pic->linesize[act_plane] / 2;