Coder Social home page Coder Social logo

Comments (12)

badtrip987 avatar badtrip987 commented on May 4, 2024 1

Thank you!

from transform360.

susiesu2 avatar susiesu2 commented on May 4, 2024

Can you provide the original file you uploaded please?

from transform360.

pleribus avatar pleribus commented on May 4, 2024

I can't provide the original for the one above due to it being for a project in development (under strict NDA), but here is another unrelated sample that exhibits same results.

https://www.dropbox.com/s/17kyd5mmebagyj6/results.zip?dl=1

And command line that is used:
ffmpeg -i ~/in.png -vf transform360="input_stereo_format=TB:cube_edge_length=1280:output_layout=CUBEMAP_23_OFFCENTER:cube_offcenter_z=-0.5" ~/out.png

Again, converting to jpg first then works fine.

from transform360.

puffpio avatar puffpio commented on May 4, 2024

from transform360.

pleribus avatar pleribus commented on May 4, 2024

Yeah, image depth is 8bpp

info

from transform360.

badtrip987 avatar badtrip987 commented on May 4, 2024

Any update on this issue? I'm having the same problem.

from transform360.

kcircnc avatar kcircnc commented on May 4, 2024

We are still looking into this. In the mean time please use transform_v1 for png I/O. Confirmed that png works well with ffmpeg -i ~/in.png -vf transform_v1="input_stereo_format=TB:cube_edge_length=1280" out.png

from transform360.

kcircnc avatar kcircnc commented on May 4, 2024

If you need features only supported in transform360 but not transform_v1, a temp hack would be to use lossless jpeg to re-wrap your input png into jpg before you feed it into transform360.
You would need either libopenjpeg or j2k enabled in your ffmpeg to encode lossless jpeg.

from transform360.

badtrip987 avatar badtrip987 commented on May 4, 2024

Is there any compression applied to the image while it's being transformed? I use the bmp format to output a lossless image and i'm seeing heavy compression blocking. Here's a screenshot.

Source is a DNXHR-HQ 8bit ( shown on the left ) and output is a bmp ( shown on the right )

transform360="input_stereo_format=MONO:cube_edge_length=1536:interpolation_alg=lanczos4:enable_low_pass_filter=1:enable_multi_threading=1:num_horizontal_segments=64:num_vertical_segments=30:adjust_kernel=1"

transform_compressed

from transform360.

kcircnc avatar kcircnc commented on May 4, 2024

Transform360/transform_v1 are filters that resample pixels from the input image. So there will be quality degrade when the sampling density is lower then the original (the same effect one will find in downscaling an image).

from transform360.

badtrip987 avatar badtrip987 commented on May 4, 2024

Is there a proven workflow that provides the best quality?

from transform360.

jchwei avatar jchwei commented on May 4, 2024

I think the problem is that: Transform360 cannot apply on images which have packed pixel format (e.g. RGB24: 8:8:8 ) . Transform360 generates map based on planar pixel format (e.g. YUV420P: plane[0] for Y, plane[1] for U and plane[2] for V) . RGB24 is packed pixel format, which stores all data in ffmpeg frame->data[0] .

At least, the Transform360/vf_transform360.c should add query_formats for AVFilter, refer to fillborders filter.

static int query_formats(AVFilterContext *ctx)
{
    static const enum AVPixelFormat pix_fmts[] = {
        AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
        AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
        AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUV420P,
        AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P,
        AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
        AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9,
        AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
        AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV440P12,
        AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14,
        AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16,
        AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA444P9,
        AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
        AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
        AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
        AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
        AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
        AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
        AV_PIX_FMT_NONE
    };
    AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
    if (!fmts_list)
        return AVERROR(ENOMEM);
    return ff_set_common_formats(ctx, fmts_list);
}

AVFilter ff_vf_transform360 = {
    .name        = "transform360",
    .description = NULL_IF_CONFIG_SMALL("Transforms equirectangular input video to the other format."),
    .init_dict   = init_dict,
    .uninit      = uninit,
    .priv_size   = sizeof(TransformContext),
    .priv_class  = &transform360_class,
    .query_formats = query_formats,
    .inputs      = avfilter_vf_transform_inputs,
    .outputs     = avfilter_vf_transform_outputs,
};

from transform360.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.