mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 09:40:18 +00:00
Added extended version of vc_deinterlace()
Allows not in-place deinterlacing.
This commit is contained in:
@@ -612,6 +612,24 @@ static void vc_deinterlace_unaligned(unsigned char *src, long src_linesize, int
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Extended version of vc_deinterlace(). The former version was in-place only.
|
||||
* This allows to output to different buffer.
|
||||
*/
|
||||
void vc_deinterlace_ex(unsigned char *src, size_t src_linesize, unsigned char *dst, size_t dst_pitch, size_t lines)
|
||||
{
|
||||
for (size_t y = 0; y < lines; y += 2) {
|
||||
for (size_t x = 0; x < src_linesize; ++x) {
|
||||
int val = (*src + src[src_linesize] + 1) >> 1;
|
||||
*dst = dst[dst_pitch] = val;
|
||||
src++;
|
||||
dst++;
|
||||
}
|
||||
src += src_linesize;
|
||||
dst += dst_pitch;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Converts v210 to UYVY
|
||||
* @param[out] dst 4-byte aligned output buffer where UYVY will be stored
|
||||
|
||||
@@ -93,6 +93,7 @@ bool codec_is_in_set(codec_t codec, codec_t *set) ATTRIBUTE(pure);
|
||||
int codec_is_const_size(codec_t codec) ATTRIBUTE(pure);
|
||||
|
||||
void vc_deinterlace(unsigned char *src, long src_linesize, int lines);
|
||||
void vc_deinterlace_ex(unsigned char *src, size_t src_linesize, unsigned char *dst, size_t dst_pitch, size_t lines);
|
||||
void vc_copylineDVS10(unsigned char *dst, const unsigned char *src, int dst_len);
|
||||
void vc_copylinev210(unsigned char *dst, const unsigned char *src, int dst_len);
|
||||
void vc_copylineYUYV(unsigned char *dst, const unsigned char *src, int dst_len);
|
||||
|
||||
Reference in New Issue
Block a user