Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rem for openSUSE:Factory checked in at 2023-01-09 17:24:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rem (Old) and /work/SRC/openSUSE:Factory/.rem.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rem" Mon Jan 9 17:24:23 2023 rev:6 rq:1057076 version:2.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rem/rem.changes 2022-12-12 17:41:30.693729537 +0100 +++ /work/SRC/openSUSE:Factory/.rem.new.32243/rem.changes 2023-01-09 17:24:24.523364253 +0100 @@ -1,0 +2,10 @@ +Fri Dec 30 20:13:54 UTC 2022 - Matthias Eliasson <eli...@opensuse.org> + +- Update to release 2.10.0 + * draw: add pixel format YUYV422 + * vidframe_draw_hline: add more formats + * vid: add support for YUV422P pixel format + * aubuf: avoid underflow of cur_sz + * cmake/pkgconfig: fix prefix variable + +------------------------------------------------------------------- Old: ---- rem-2.8.0.tar.gz New: ---- rem-2.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rem.spec ++++++ --- /var/tmp/diff_new_pack.dT6stx/_old 2023-01-09 17:24:24.963366743 +0100 +++ /var/tmp/diff_new_pack.dT6stx/_new 2023-01-09 17:24:24.967366766 +0100 @@ -16,10 +16,10 @@ # -%global sover 3 +%global sover 4 %global libname lib%{name}%{sover} Name: rem -Version: 2.8.0 +Version: 2.10.0 Release: 0 Summary: Audio and Video processing media library License: BSD-3-Clause ++++++ rem-2.8.0.tar.gz -> rem-2.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/.github/workflows/build.yml new/rem-2.10.0/.github/workflows/build.yml --- old/rem-2.8.0/.github/workflows/build.yml 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/.github/workflows/build.yml 2022-12-06 13:46:35.000000000 +0100 @@ -17,7 +17,7 @@ CC: ${{ matrix.compiler }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: sreimers/pr-dependency-action@v0.5 with: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/.github/workflows/ccheck.yml new/rem-2.10.0/.github/workflows/ccheck.yml --- old/rem-2.8.0/.github/workflows/ccheck.yml 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/.github/workflows/ccheck.yml 2022-12-06 13:46:35.000000000 +0100 @@ -8,7 +8,7 @@ runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: ccheck run: | wget "https://raw.githubusercontent.com/baresip/baresip/main/test/ccheck.py" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/.github/workflows/mingw.yml new/rem-2.10.0/.github/workflows/mingw.yml --- old/rem-2.8.0/.github/workflows/mingw.yml 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/.github/workflows/mingw.yml 2022-12-06 13:46:35.000000000 +0100 @@ -11,7 +11,7 @@ run: | sudo apt-get update && sudo apt-get install -y mingw-w64 - - uses: actions/checkout@v2 # needed for pr checkout + - uses: actions/checkout@v3 # needed for pr checkout - uses: sreimers/pr-dependency-action@v0.5 with: @@ -31,7 +31,7 @@ mv re baresip-win32/ mv retest baresip-win32/ - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: baresip-win32/rem @@ -64,7 +64,7 @@ steps: - uses: actions/download-artifact@v2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: baresip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/CHANGELOG.md new/rem-2.10.0/CHANGELOG.md --- old/rem-2.8.0/CHANGELOG.md 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/CHANGELOG.md 2022-12-06 13:46:35.000000000 +0100 @@ -6,6 +6,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.10.0] - 2022-12-06 + +### What's Changed +* draw: add pixel format YUYV422 by @alfredh in https://github.com/baresip/rem/pull/106 +* vidframe_draw_hline: add more formats by @alfredh in https://github.com/baresip/rem/pull/107 +* vid: add support for YUV422P pixel format by @alfredh in https://github.com/baresip/rem/pull/103 +* aubuf: avoid underflow of cur_sz by @cspiel1 in https://github.com/baresip/rem/pull/108 +* cmake/pkgconfig: fix prefix variable by @cspiel1 in https://github.com/baresip/rem/pull/109 + +**Full Changelog**: https://github.com/baresip/rem/compare/v2.9.0...v2.10.0 + +--- + +## [v2.9.0] - 2022-11-01 + +### What's Changed +* cmake: add pre-release version handling by @sreimers in https://github.com/baresip/rem/pull/95 +* README.md: Update build instructions for cmake by @robert-scheck in https://github.com/baresip/rem/pull/96 +* aubuf: exclude non compatible CXX functions by @sreimers in https://github.com/baresip/rem/pull/97 +* auframe: skip level calculation if format is RAW by @alfredh in https://github.com/baresip/rem/pull/99 +* ci: use actions/checkout@v3 by @sreimers in https://github.com/baresip/rem/pull/101 +* vidframe_draw_point: add NV12 and NV21 pixel format by @alfredh in https://github.com/baresip/rem/pull/102 + + +**Full Changelog**: https://github.com/baresip/rem/compare/v2.8.0...v2.9.0 + +--- + ## [v2.8.0] - 2022-10-01 * cmake: bump min. version 3.10 by @sreimers in https://github.com/baresip/rem/pull/79 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/CMakeLists.txt new/rem-2.10.0/CMakeLists.txt --- old/rem-2.8.0/CMakeLists.txt 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/CMakeLists.txt 2022-12-06 13:46:35.000000000 +0100 @@ -12,13 +12,23 @@ cmake_minimum_required(VERSION 3.10) project(rem - VERSION 2.8.0 + VERSION 2.10.0 LANGUAGES C HOMEPAGE_URL https://github.com/baresip/rem DESCRIPTION "Audio and video processing media library" ) -set(PROJECT_SOVERSION 3) # bump if ABI breaks +set(PROJECT_SOVERSION 4) # bump if ABI breaks + +# Pre-release identifier, comment out on a release +# Increment for breaking changes (dev2, dev3...) +#set(PROJECT_VERSION_PRE dev) + +if(PROJECT_VERSION_PRE) + set(PROJECT_VERSION_FULL ${PROJECT_VERSION}-${PROJECT_VERSION_PRE}) +else() + set(PROJECT_VERSION_FULL ${PROJECT_VERSION}) +endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) @@ -67,6 +77,18 @@ find_package(re CONFIG REQUIRED HINTS ../re/cmake) +list(APPEND RE_DEFINITIONS + -DVERSION="${PROJECT_VERSION_FULL}" + -DVER_MAJOR=${PROJECT_VERSION_MAJOR} + -DVER_MINOR=${PROJECT_VERSION_MINOR} + -DVER_PATCH=${PROJECT_VERSION_PATCH} +) + +############################################################################## +# +# Source/Header section +# + set(SRCS src/aac/aac.c src/au/fmt.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/Makefile new/rem-2.10.0/Makefile --- old/rem-2.8.0/Makefile 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/Makefile 2022-12-06 13:46:35.000000000 +0100 @@ -6,7 +6,7 @@ # Main version number VER_MAJOR := 2 -VER_MINOR := 8 +VER_MINOR := 10 VER_PATCH := 0 # Development version, comment out on a release @@ -15,7 +15,7 @@ # Libtool similar ABI versioning # https://github.com/baresip/re/wiki/ABI-Versioning -ABI_MAJOR := 3 +ABI_MAJOR := 4 ABI_AGE := $(VER_MINOR) ABI_REV := $(VER_PATCH) @@ -26,7 +26,7 @@ VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)-$(VER_PRE) endif OPT_SPEED := 1 -LIBRE_MIN := 2.8.0 +LIBRE_MIN := 2.10.0 ifndef LIBRE_MK LIBRE_MK := $(shell [ -f ../re/mk/re.mk ] && \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/README.md new/rem-2.10.0/README.md --- old/rem-2.8.0/README.md 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/README.md 2022-12-06 13:46:35.000000000 +0100 @@ -31,11 +31,40 @@ must be installed before building. -### Build with default options +### Build with debug enabled ``` -$ make -$ sudo make install +$ cmake -B build +$ cmake --build build -j +$ sudo cmake --install build +$ sudo ldconfig +``` + +On some distributions, /usr/local/lib may not be included in ld.so.conf. +You can check with `grep "/usr/local/lib" /etc/ld.so.conf.d/*.conf` +and add if necessary: + +``` +$ echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libc.conf +$ sudo ldconfig +``` + + +### Build with release + +``` +$ cmake -B build -DCMAKE_BUILD_TYPE=Release +$ cmake --build build -j +$ sudo cmake --install build +$ sudo ldconfig +``` + +### Build with clang compiler + +``` +$ cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ +$ cmake --build build -j +$ sudo cmake --install build $ sudo ldconfig ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/debian/changelog new/rem-2.10.0/debian/changelog --- old/rem-2.8.0/debian/changelog 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/debian/changelog 2022-12-06 13:46:35.000000000 +0100 @@ -1,3 +1,15 @@ +librem (2.10.0) unstable; urgency=medium + + * version 2.10.0 + + -- Sebastian Reimers <sebastian.reim...@gmail.com> Tue, 6 Dec 2022 08:00:00 +0200 + +librem (2.9.0) unstable; urgency=medium + + * version 2.9.0 + + -- Sebastian Reimers <sebastian.reim...@gmail.com> Thu, 1 Nov 2022 08:00:00 +0200 + librem (2.8.0) unstable; urgency=medium * version 2.8.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/include/rem_aubuf.h new/rem-2.10.0/include/rem_aubuf.h --- old/rem-2.8.0/include/rem_aubuf.h 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/include/rem_aubuf.h 2022-12-06 13:46:35.000000000 +0100 @@ -25,6 +25,21 @@ size_t aubuf_cur_size(const struct aubuf *ab); void aubuf_drop_auframe(struct aubuf *ab, const struct auframe *af); + +static inline int aubuf_append(struct aubuf *ab, struct mbuf *mb) +{ + return aubuf_append_auframe(ab, mb, NULL); +} + + +static inline int aubuf_get_samp(struct aubuf *ab, uint32_t ptime, + int16_t *sampv, size_t sampc) +{ + return aubuf_get(ab, ptime, (uint8_t *)sampv, sampc * 2); +} + + +#ifndef __cplusplus static inline int aubuf_write(struct aubuf *ab, const uint8_t *p, size_t sz) { struct auframe af = { @@ -40,12 +55,6 @@ } -static inline int aubuf_append(struct aubuf *ab, struct mbuf *mb) -{ - return aubuf_append_auframe(ab, mb, NULL); -} - - static inline int aubuf_write_samp(struct aubuf *ab, const int16_t *sampv, size_t sampc) { @@ -91,10 +100,4 @@ aubuf_read_auframe(ab, &af); } - - -static inline int aubuf_get_samp(struct aubuf *ab, uint32_t ptime, - int16_t *sampv, size_t sampc) -{ - return aubuf_get(ab, ptime, (uint8_t *)sampv, sampc * 2); -} +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/include/rem_vid.h new/rem-2.10.0/include/rem_vid.h --- old/rem-2.8.0/include/rem_vid.h 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/include/rem_vid.h 2022-12-06 13:46:35.000000000 +0100 @@ -16,6 +16,7 @@ VID_FMT_NV12, /* planar YUV 4:2:0 12bpp UV interleaved */ VID_FMT_NV21, /* planar YUV 4:2:0 12bpp VU interleaved */ VID_FMT_YUV444P, /* planar YUV 4:4:4 24bpp */ + VID_FMT_YUV422P, /* planar YUV 4:2:2 16bpp */ /* marker */ VID_FMT_N }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/packaging/librem.pc.in new/rem-2.10.0/packaging/librem.pc.in --- old/rem-2.8.0/packaging/librem.pc.in 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/packaging/librem.pc.in 2022-12-06 13:46:35.000000000 +0100 @@ -1,6 +1,6 @@ prefix="@CMAKE_INSTALL_PREFIX@" exec_prefix=${prefix} -libdir={$prefix}/lib +libdir=${prefix}/lib includedir=${prefix}/include/rem Name: librem diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/src/aubuf/aubuf.c new/rem-2.10.0/src/aubuf/aubuf.c --- old/rem-2.8.0/src/aubuf/aubuf.c 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/src/aubuf/aubuf.c 2022-12-06 13:46:35.000000000 +0100 @@ -254,7 +254,7 @@ #endif f = list_ledata(ab->afl.head); if (f) { - ab->cur_sz -= sz; + ab->cur_sz -= mbuf_get_left(f->mb); mem_deref(f); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/src/auframe/auframe.c new/rem-2.10.0/src/auframe/auframe.c --- old/rem-2.8.0/src/auframe/auframe.c 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/src/auframe/auframe.c 2022-12-06 13:46:35.000000000 +0100 @@ -96,6 +96,9 @@ if (!af) return AULEVEL_UNDEF; + if (af->fmt == AUFMT_RAW) + return AULEVEL_UNDEF; + if (af->level == AULEVEL_UNDEF) af->level = aulevel_calc_dbov(af->fmt, af->sampv, af->sampc); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/src/vid/draw.c new/rem-2.10.0/src/vid/draw.c --- old/rem-2.8.0/src/vid/draw.c 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/src/vid/draw.c 2022-12-06 13:46:35.000000000 +0100 @@ -24,6 +24,7 @@ { uint8_t *yp, *up, *vp; uint32_t *p; + size_t uv_offset; if (!f) return; @@ -43,6 +44,17 @@ vp[0] = rgb2v(r, g, b); break; + case VID_FMT_YUYV422: + uv_offset = (f->linesize[0] * y + x * 2) & ~3; + + yp = f->data[0] + uv_offset; + + yp[0] = rgb2y(r, g, b); + yp[1] = rgb2u(r, g, b); + yp[2] = rgb2y(r, g, b); + yp[3] = rgb2v(r, g, b); + break; + case VID_FMT_YUV444P: yp = f->data[0] + f->linesize[0] * y + x; up = f->data[1] + f->linesize[1] * y + x; @@ -59,6 +71,40 @@ *p = (uint32_t)r << 16 | (uint32_t)g << 8 | b; break; + case VID_FMT_NV12: + uv_offset = (f->linesize[1] * (y/2) + x) & ~1; + + yp = f->data[0] + f->linesize[0] * y + x; + up = f->data[1] + uv_offset; + vp = f->data[1] + uv_offset + 1; + + yp[0] = rgb2y(r, g, b); + up[0] = rgb2u(r, g, b); + vp[0] = rgb2v(r, g, b); + break; + + case VID_FMT_NV21: + uv_offset = (f->linesize[1] * (y/2) + x) & ~1; + + yp = f->data[0] + f->linesize[0] * y + x; + up = f->data[1] + uv_offset + 1; + vp = f->data[1] + uv_offset; + + yp[0] = rgb2y(r, g, b); + up[0] = rgb2u(r, g, b); + vp[0] = rgb2v(r, g, b); + break; + + case VID_FMT_YUV422P: + yp = f->data[0] + f->linesize[0] * y + x; + up = f->data[1] + f->linesize[1] * y + x/2; + vp = f->data[2] + f->linesize[2] * y + x/2; + + yp[0] = rgb2y(r, g, b); + up[0] = rgb2u(r, g, b); + vp[0] = rgb2v(r, g, b); + break; + default: (void)re_fprintf(stderr, "vidframe_draw_point:" " unsupported format %s\n", @@ -84,6 +130,8 @@ uint8_t r, uint8_t g, uint8_t b) { uint8_t y, u, v; + uint8_t *p; + size_t offset; if (!f) return; @@ -109,6 +157,38 @@ memset(f->data[0] + y0*f->linesize[0] + x0, y, w); memset(f->data[1] + y0*f->linesize[1] + x0, u, w); memset(f->data[2] + y0*f->linesize[2] + x0, v, w); + break; + + case VID_FMT_YUYV422: + offset = (y0*f->linesize[0] + x0) & ~3; + p = f->data[0] + offset; + + for (unsigned x=0; x<w; x++) { + + p[x*4 ] = y; + p[x*4+1] = u; + p[x*4+2] = y; + p[x*4+3] = v; + } + break; + + case VID_FMT_NV12: + offset = (f->linesize[1] * (y0/2) + x0) & ~1; + p = f->data[1] + offset; + + memset(f->data[0] + y0 *f->linesize[0] + x0, y, w); + + for (unsigned x=0; x<w; x+=2) { + + p[x ] = u; + p[x+1] = v; + } + break; + + case VID_FMT_YUV422P: + memset(f->data[0] + y0*f->linesize[0] + x0, y, w); + memset(f->data[1] + y0*f->linesize[1] + x0, u, w); + memset(f->data[2] + y0*f->linesize[2] + x0, v, w); break; default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/src/vid/fmt.c new/rem-2.10.0/src/vid/fmt.c --- old/rem-2.8.0/src/vid/fmt.c 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/src/vid/fmt.c 2022-12-06 13:46:35.000000000 +0100 @@ -20,6 +20,7 @@ {"nv12", 3, 2, { {0, 1}, {1, 2}, {1, 2}, {0, 0} } }, {"nv21", 3, 2, { {0, 1}, {1, 2}, {1, 2}, {0, 0} } }, {"yuv444p", 3, 3, { {0, 1}, {1, 1}, {2, 1}, {0, 0} } }, + {"yuv422p", 3, 3, { {0, 1}, {1, 1}, {2, 1}, {0, 0} } }, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rem-2.8.0/src/vid/frame.c new/rem-2.10.0/src/vid/frame.c --- old/rem-2.8.0/src/vid/frame.c 2022-10-01 10:24:59.000000000 +0200 +++ new/rem-2.10.0/src/vid/frame.c 2022-12-06 13:46:35.000000000 +0100 @@ -33,6 +33,7 @@ case VID_FMT_NV12: return (size_t)sz->w * sz->h * 3 / 2; case VID_FMT_NV21: return (size_t)sz->w * sz->h * 3 / 2; case VID_FMT_YUV444P: return (size_t)sz->w * sz->h * 3; + case VID_FMT_YUV422P: return (size_t)sz->w * sz->h * 2; default: return 0; } @@ -85,6 +86,8 @@ w = (sz->w + 1) >> 1; h = (sz->h + 1) >> 1; + unsigned w2 = (sz->w + 1) >> 1; + memset(vf->linesize, 0, sizeof(vf->linesize)); memset(vf->data, 0, sizeof(vf->data)); @@ -136,6 +139,16 @@ vf->data[2] = vf->data[1] + vf->linesize[1] * sz->h; break; + case VID_FMT_YUV422P: + vf->linesize[0] = sz->w; + vf->linesize[1] = w2; + vf->linesize[2] = w2; + + vf->data[0] = buf; + vf->data[1] = vf->data[0] + vf->linesize[0] * sz->h; + vf->data[2] = vf->data[1] + vf->linesize[1] * sz->h; + break; + default: (void)re_printf("vidframe: no fmt %s\n", vidfmt_name(fmt)); return; @@ -249,6 +262,14 @@ } break; + case VID_FMT_YUV422P: + h = vf->size.h; + + memset(vf->data[0], rgb2y(r, g, b), h * vf->linesize[0]); + memset(vf->data[1], rgb2u(r, g, b), h * vf->linesize[1]); + memset(vf->data[2], rgb2v(r, g, b), h * vf->linesize[2]); + break; + default: (void)re_printf("vidfill: no fmt %s\n", vidfmt_name(vf->fmt)); break; @@ -266,6 +287,8 @@ { const uint8_t *ds0, *ds1, *ds2; unsigned lsd, lss, w, h, y; + unsigned lsd1, lss1; + unsigned lsd2, lss2; uint8_t *dd0, *dd1, *dd2; if (!dst || !src) @@ -378,8 +401,67 @@ } break; + case VID_FMT_YUV422P: + lsd = dst->linesize[0]; + lss = src->linesize[0]; + lsd1 = dst->linesize[1]; + lss1 = src->linesize[1]; + lsd2 = dst->linesize[2]; + lss2 = src->linesize[2]; + + dd0 = dst->data[0]; + dd1 = dst->data[1]; + dd2 = dst->data[2]; + + ds0 = src->data[0]; + ds1 = src->data[1]; + ds2 = src->data[2]; + + w = dst->size.w & ~1; + h = dst->size.h & ~1; + + for (y=0; y<h; y+=1) { + + memcpy(dd0, ds0, w); + dd0 += lsd; + ds0 += lss; + + memcpy(dd1, ds1, w/2); + dd1 += lsd1; + ds1 += lss1; + + memcpy(dd2, ds2, w/2); + dd2 += lsd2; + ds2 += lss2; + } + break; + + case VID_FMT_YUYV422: + lsd = dst->linesize[0]; + lss = src->linesize[0]; + + dd0 = dst->data[0]; + + ds0 = src->data[0]; + + w = dst->size.w & ~1; + h = dst->size.h & ~1; + + for (y=0; y<h; y+=2) { + + memcpy(dd0, ds0, w*2); + dd0 += lsd; + ds0 += lss; + + memcpy(dd0, ds0, w*2); + dd0 += lsd; + ds0 += lss; + } + break; + default: - (void)re_printf("vidframe_copy(): unsupported format\n"); + (void)re_printf("vidframe_copy(): unsupported format:" + " %s\n", vidfmt_name(dst->fmt)); break; } }