Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

10位版图像缺乱补丁(Fix two corrupt-output issues in 10-bit build)#3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
xatabhk wants to merge2 commits intouavs3:master
base:master
Choose a base branch
Loading
fromxatabhk:master
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletionslibuavs3e.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -153,9 +153,31 @@ static void __imgb_cpy_plane(void *src, void *dst, int bw, int h, int s_src, int

static void uavs3e_image_copy_pic(void *dst[4], int i_dst[4], unsigned char *const src[4], const int i_src[4], enum AVPixelFormat pix_fmts, int width, int height)
{
__imgb_cpy_plane(src[0], dst[0], width, height, i_src[0], i_dst[0]);
__imgb_cpy_plane(src[1], dst[1], width >> 1, height >> 1, i_src[1], i_dst[1]);
__imgb_cpy_plane(src[2], dst[2], width >> 1, height >> 1, i_src[2], i_dst[2]);
if(sizeof(pel)>1 && pix_fmts==AV_PIX_FMT_YUV420P){ //sizeof(pel)==2 when BIT_DEPTH == 10
//Expand YUV420P to 2-byte
for(int plane=0;plane<3;plane++){
int planeheight=(plane==0)?height:height>>1;
int planewidth=(plane==0)?width:width>>1;

pel *dstpel = (pel *)dst[plane];
int ind_src = 0;
int ind_dst = 0;

for (int y = 0; y < planeheight; y++) {
for (int x = 0; x < planewidth; x++) {
dstpel[ind_dst + x] = src[plane][ind_src + x]; //byte to short
}//for (int x = 0; x < planewidth; x++)
ind_src += i_src[plane];
ind_dst += (i_dst[plane]>>1);
}//for (int y = 0; y < planeheight; y++)
}//for(int plane=0;plane<3;plane++)
}
else{
width=(sizeof(pel)>1)?width<<1:width;
__imgb_cpy_plane(src[0], dst[0], width, height, i_src[0], i_dst[0]);
__imgb_cpy_plane(src[1], dst[1], width >> 1, height >> 1, i_src[1], i_dst[1]);
__imgb_cpy_plane(src[2], dst[2], width >> 1, height >> 1, i_src[2], i_dst[2]);
}
}

static int uavs3e_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp