Resize (downsize) YUV420sp image

后端 未结 3 783
南旧
南旧 2020-12-14 23:19

I am trying to resize (scale down) an image which comes in YUV420sp format. Is it possible to do such image resizing without converting it into RGB, so directly manipulating

3条回答
  •  粉色の甜心
    2020-12-15 00:14

    YUV420sp has the Y in one plane and the U&V in another. If you split the U& V into separate planes, you can then perform the same scaling operation on each of the 3 planes in turn, without first having to go from 4:2:0 -> 4:4:4.

    Have a look at the source code for libyuv; it just scales the planes: https://code.google.com/p/libyuv/source/browse/trunk/source/scale.cc

提交回复
热议问题