Giter Site home page Giter Site logo

akarinvs / mvsfunc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from homeofvapoursynthevolution/mvsfunc

1.0 1.0 0.0 91 KB

mawen1250's VapourSynth functions. Please use https://github.com/AmusementClub/mvsfunc instead.

Home Page: https://github.com/AmusementClub/mvsfunc

Python 100.00%

mvsfunc's People

Contributors

breakertt avatar mawen1250 avatar

Stargazers

 avatar

mvsfunc's Issues

GetMatrix: ignores input clip frame property

Example:

   A = core.lasmas.LWLibavSource("1.jpg")  # pick a large picture, w > 1024 or h > 576. This returns a YUV420 clip
   B = core.imwri.Read("1.jpg")      # this returns a RGB clip
   mvf.Preview([A, B]).set_output()  # should observe typical color errors when a 601 source is processed with 709 matrix.

The problem is that JPEG is hardcoded to use 601 (unless ICC included), and ffmpeg clearly labels the fact in frame props, however, mvf.Preview/mvf.ToRGB/mvf.GetMatrix does not use that info when determining which matrix to convert YUV to RGB.

When the user doesn't specify an explicit matrix argument, mvf.GetMatrix will use the width and height to guess a matrix, without ever taking the _Matrix frame properties into account.

I understand the reason for not honoring the frame properties because at the time of script execution, there is no way to query frame properties (unless it calls synchronous get_frame(0) to get the first frame and even if it did so, there is no guarantee that the frame properties stay the same.) Therefore, it should be the responsibility for downstream filters to honor this. Normally they do, but as mvf.GetMatrix always return an explicit matrix, such functionality is overridden.
(To test this hypothesis, I modified GetMatrix to always return None, and the above reproduction program works fine.)

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.