Code Monkey home page Code Monkey logo

Comments (8)

funman avatar funman commented on July 1, 2024

It works with uplay -s 856x480 although the file is 854x480

from upipe.

funman avatar funman commented on July 1, 2024

glxplay is different because it uses rgb24 rather than rgb15

from upipe.

funman avatar funman commented on July 1, 2024
diff --git a/lib/upipe-av/upipe_avcodec_decode.c b/lib/upipe-av/upipe_avcodec_decode.c
index bf674ca8..46b4c969 100644
--- a/lib/upipe-av/upipe_avcodec_decode.c
+++ b/lib/upipe-av/upipe_avcodec_decode.c
@@ -295,8 +295,8 @@ static int upipe_avcdec_get_buffer_pic(struct AVCodecContext *context,
     }
 
     UBASE_FATAL(upipe, uref_pic_flow_set_align(flow_def_attr, align))
-    UBASE_FATAL(upipe, uref_pic_flow_set_hsize(flow_def_attr, context->width))
-    UBASE_FATAL(upipe, uref_pic_flow_set_vsize(flow_def_attr, context->height))
+    UBASE_FATAL(upipe, uref_pic_flow_set_hsize(flow_def_attr, context->coded_width))
+    UBASE_FATAL(upipe, uref_pic_flow_set_vsize(flow_def_attr, context->coded_height))
     UBASE_FATAL(upipe, uref_pic_flow_set_hsize_visible(flow_def_attr, context->width))
     UBASE_FATAL(upipe, uref_pic_flow_set_vsize_visible(flow_def_attr, context->height))
     struct urational fps;

from upipe.

funman avatar funman commented on July 1, 2024

@cmassiot ?

from upipe.

tmatth avatar tmatth commented on July 1, 2024

That change works as expected here.

from upipe.

nto avatar nto commented on July 1, 2024

Additionally, shouldn't upipe-gl use hsize_visible and vsize_visible somewhere to crop the visible surface?

from upipe.

cmassiot avatar cmassiot commented on July 1, 2024

I don't think this is the appropriate patch for several reasons :

  • hsize_visible and vsize_visible are currently unused in upipe and I'm thinking of deprecating them. It is due to the fact that it is an internal codec value, and it is equivalent to doing ubuf_pic_alloc(codec_size) then ubuf_pic_resize(visible_size)
  • it doesn't fix the real bug in upipe-gl which is that it considers that width == stride.
    The attached patch fixes the last issue. It is wrong however as pixels beyond the width shouldn't be displayed, but I don't know how to do it with the OpenGL API.
    upipe.txt

from upipe.

cmassiot avatar cmassiot commented on July 1, 2024

Fixed by ec36886

from upipe.

Related Issues (18)

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.