Git Product home page Git Product logo

libde265's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libde265's Issues

Skip frames if decoding takes too long

It would be great to have a way to tell the decoder the duration of a frame, so it can detect slow decoding and skip the frame if it is too late.

This happens on my machine for example for 4k non-wpp streams. When decoded with VLC, the frames are almost immediately too late as decoding basically happens single-threaded leading to a frozen image. Same will happen for slower machines.

Visual Studio build issue

-file(GLOB LIBSRC ../libde265/.c ../extra/.c)
+file(GLOB LIBSRC ../libde265/.cc ../extra/.c)

-file(GLOB ASMSRC0 ../libde265/x86/sse.c ../libde265/x86/sse-dct.c)
+file(GLOB ASMSRC1 ../libde265/x86/sse-motion.c)

This project build well in VS2013

number of frames decoded does not match

Hi,
I've been playing around with h265 encoding/decoding for a scientific "compression" library. I started off using the ffmpeg based libav* API and succeeded in modifying the decoding_encoding.c example so I could produce a h265 file. However, I have a hard time decoding the h265 bitstream. Here is the code for reference:
https://gist.github.com/psteinb/bf12348d799108f390f5
I already posted to the libav-users mailing list, but with no reply yet
https://lists.ffmpeg.org/pipermail/libav-user/2015-August/008385.html

If I use dec265 to decode the stream, the tool reports 22 frames instead of 25 which I'd expect. Any idea, what is going on?
Best -

Don't export private symbols

We are currently exporting lots of private symbols, which we shouldn't do to support symbols versioning. You can use libtool's -export-symbols and -export-symbols-regex options to limit this.

See https://wiki.debian.org/UsingSymbolsFiles for details on symbols versioning.

Please let me know if I should prepare a pull request to only export the de265_* functions.

Indicating the end of a data stream

I see the following description in your API.

If you want to flush the data and force decoding of the data so far
(e.g. at the end of a file), call de265_decode_data() with 'length' zero.

How do you think about to give this function call variant a name like "de265_close_input_stream" or "de265_stream_input_close"?
Is a different function needed to feed your engine with further data in the same processing context afterwards? How do you "reopen" it?

SIGSEGV while playing video

issue

VLC crashes after playing video for a couple of seconds. I have attached the back-trace below, let me know if you need anything else. I also attached the CPU info since it seems to be problem with some vector creation.

EDIT: My guess is that it run out of memory or something like that since all the videos pretty much crash at the same time after starting.

backtrace

(gdb) bt
#0  0x00007fcf0fbcc954 in _mm_set_epi64x (
    __q0=<error reading variable: Cannot access memory at address 0x7fcef09ad000>, __q1=0)
    at /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:573
#1  _mm_set_epi64 (__q0=<error reading variable: Cannot access memory at address 0x7fcef09ad000>, __q1=...)
    at /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:579
#2  _mm_loadl_epi64 (__P=0x7fcef09acffc) at /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:690
#3  ff_hevc_put_hevc_epel_pixels_8_sse (dst=0x7fcf0c247200, dststride=<optimized out>, _src=<optimized out>, 
    srcstride=960, width=12, height=16, mx=0, my=0, mcbuffer=0x0) at sse-motion.cc:997
#4  0x00007fcf0fb88488 in put_hevc_epel (mx=0, my=0, mcbuffer=0x0, this=0x7fcf08f78af0, this=0x7fcf08f78af0, 
    bit_depth=8, height=16, width=12, srcstride=960, src=<optimized out>, dststride=32, dst=0x7fcf0c246e40)
    at ../libde265/acceleration.h:296
#5  mc_chroma<unsigned char> (ctx=ctx@entry=0x7fcf08f78a40, sps=sps@entry=0x7fcf026cbab0, mv_x=0, mv_y=0, 
    xP=xP@entry=1896, yP=yP@entry=1056, out=out@entry=0x7fcf0c246e40, out_stride=out_stride@entry=32, 
    ref=0x7fcef092d800 '\211' <repeats 13 times>, '\212' <repeats 41 times>, '\213' <repeats 49 times>, '\214' <repeats 17 times>, '\213' <repeats 30 times>, '\214' <repeats 50 times>..., ref_stride=960, nPbWC=nPbWC@entry=12, 
    nPbHC=nPbHC@entry=16, bit_depth_C=bit_depth_C@entry=8) at motion.cc:204
#6  0x00007fcf0fb865bb in generate_inter_prediction_samples (ctx=ctx@entry=0x7fcf08f78a40, 
    shdr=shdr@entry=0x7fcf00088240, img=img@entry=0x7fcf026cb760, xC=xC@entry=1888, yC=yC@entry=1056, xB=xB@entry=8, 
    yB=yB@entry=0, nCS=nCS@entry=32, nPbW=nPbW@entry=24, nPbH=nPbH@entry=32, vi=vi@entry=0x7fcf0c24aec0)
    at motion.cc:389
#7  0x00007fcf0fb8728c in decode_prediction_unit (ctx=0x7fcf08f78a40, shdr=0x7fcf00088240, img=0x7fcf026cb760, 
    motion=..., xC=xC@entry=1888, yC=yC@entry=1056, xB=xB@entry=8, yB=yB@entry=0, nCS=nCS@entry=32, 
    nPbW=nPbW@entry=24, nPbH=nPbH@entry=32, partIdx=partIdx@entry=1) at motion.cc:2080
#8  0x00007fcf0fb95274 in read_prediction_unit (tctx=tctx@entry=0x7fcf0c24b160, xC=xC@entry=1888, yC=yC@entry=1056, 
    xB=xB@entry=8, yB=0, nPbW=<optimized out>, nPbH=32, ctDepth=0, nCS=32, partIdx=1) at slice.cc:4123
#9  0x00007fcf0fb95ea3 in read_coding_unit (tctx=tctx@entry=0x7fcf0c24b160, x0=1888, y0=1056, log2CbSize=5, 
    ctDepth=ctDepth@entry=0) at slice.cc:4508
#10 0x00007fcf0fb97005 in read_coding_quadtree (tctx=tctx@entry=0x7fcf0c24b160, x0=<optimized out>, 
    y0=<optimized out>, log2CbSize=<optimized out>, ctDepth=ctDepth@entry=0) at slice.cc:4632
#11 0x00007fcf0fb97130 in read_coding_tree_unit (tctx=tctx@entry=0x7fcf0c24b160) at slice.cc:2856
#12 0x00007fcf0fb97233 in decode_substream (tctx=tctx@entry=0x7fcf0c24b160, block_wpp=block_wpp@entry=false, 
    first_independent_substream=<optimized out>) at slice.cc:4721
#13 0x00007fcf0fb9783d in read_slice_segment_data (tctx=tctx@entry=0x7fcf0c24b160) at slice.cc:5034
#14 0x00007fcf0fb72c22 in decoder_context::decode_slice_unit_sequential (this=this@entry=0x7fcf08f78a40, 
    imgunit=imgunit@entry=0x7fcf03529d50, sliceunit=sliceunit@entry=0x7fcf000298f0) at decctx.cc:840
---Type <return> to continue, or q <return> to quit---
#15 0x00007fcf0fb73676 in decoder_context::decode_slice_unit_parallel (this=this@entry=0x7fcf08f78a40, 
    imgunit=0x7fcf03529d50, sliceunit=0x7fcf000298f0) at decctx.cc:942
#16 0x00007fcf0fb73a30 in decoder_context::decode_some (this=this@entry=0x7fcf08f78a40, 
    did_work=did_work@entry=0x7fcf0c24fb50) at decctx.cc:727
#17 0x00007fcf0fb750db in decoder_context::read_slice_NAL (this=this@entry=0x7fcf08f78a40, reader=..., 
    nal=nal@entry=0x7fcf000017e0, nal_hdr=...) at decctx.cc:685
#18 0x00007fcf0fb752b9 in decoder_context::decode_NAL (this=this@entry=0x7fcf08f78a40, nal=0x7fcf000017e0)
    at decctx.cc:1227
#19 0x00007fcf0fb7558c in decoder_context::decode (this=0x7fcf08f78a40, more=0x7fcf0c24fc48) at decctx.cc:1315
#20 0x00007fcf0fdfa6ce in Decode () from /usr/lib/vlc/plugins/codec/libde265_plugin.so
#21 0x00007fcf5bd4ba5f in ?? () from /usr/lib/libvlccore.so.7
#22 0x00007fcf5bd4d95a in ?? () from /usr/lib/libvlccore.so.7
#23 0x00007fcf5c5d8184 in start_thread (arg=0x7fcf0c250700) at pthread_create.c:312
#24 0x00007fcf5c0fa37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) 

cpu info from lshw

*-cpu
          description: CPU
          product: AMD FX(tm)-6300 Six-Core Processor
          vendor: Advanced Micro Devices [AMD]
          physical id: 4
          bus info: cpu@0
          version: AMD FX(tm)-6300 Six-Core Processor
          serial: To Be Filled By O.E.M.
          slot: CPU 1
          size: 2500MHz
          capacity: 3500MHz
          width: 64 bits
          clock: 200MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold vmmcall bmi1 cpufreq

enc265: assertion failure in de265_image::alloc_image

When trying to encode a yuv file with the enc265 application the following occurs:

ImageSource_YUV::read_next_image() on line 57 in image-io.cc calls de265_image::alloc_image with sps = NULL:

img->alloc_image(width,height,de265_chroma_420, NULL, false,
               NULL, NULL, 0, NULL, false);

which triggers the assertion on line 240 in image.cc assert(sps); crashing the program.

de265_error de265_image::alloc_image(int w,int h, enum de265_chroma c,
                                 const seq_parameter_set* sps, bool allocMetadata,
                                 decoder_context* dctx,
                                 encoder_context* ectx,
                                 de265_PTS pts, void* user_data,
                                 bool useCustomAllocFunc)

The previous assertion is commented out:
//if (allocMetadata) { assert(sps); }

iPhone 4 app not decoding

Hi, got redirected here from the app store.
I can't decode anything from the iPhone app. The app shows a couple frames and audio is fine (sometimes) but then it freezes. Is the iPhone 4 supported?

Best!

Autoconf undefined macros on Debian 7.8

On Debian 7.8 (wheezy)

> autogen.sh
[...]
configure.ac:10: error: possibly undefined macro: AC_SUBST
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:96: error: possibly undefined macro: AC_DEFINE

I tried hacking it with m4_pattern_allow, but it just failed in the ./configure instead.

Unable to compile arm optimizations with clang

I got the following errors when trying to compile arm optimizations using clang.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DHAVE_CONFIG_H -I. -I../.. -mfpu=neon -I.. -DHAVE_NEON -DEXTERN_ASM= -DHAVE_AS_FUNC -DHAVE_SECTION_DATA_REL_RO -g -O2 -c -o libde265_arm_neon_la-asm.lo test -f 'asm.S' || echo './'asm.S
clang: warning: argument unused during compilation: '-mfpu=neon'
asm.S:44:9: error: unknown directive
.arch armv7-a
^
asm.S:54:9: error: unknown directive
.fpu neon
^
asm.S:59:9: error: unknown directive
.syntax unified
^
asm.S:60:3: error: unexpected token at start of statement
@ .thumb
^
asm.S:61:3: error: unexpected token at start of statement
@ .eabi_attribute 25, 1 @ Tag_ABI_align_preserved
^
asm.S:62:3: error: unexpected token at start of statement
@ .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable
^

Warning about logical parentheses

Clang reports a warning about placement of parentheses (this is in the encoder branch):

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I.. -DLIBDE265_EXPORTS -g -O2 -Wreturn-type -std=gnu++11 -D__STRICT_ANSI__ -DDE265_LOG_ERROR -MT libde265_la-sao.lo -MD -MP -MF .deps/libde265_la-sao.Tpo -c sao.cc  -fPIC -DPIC -o .libs/libde265_la-sao.o
sao.cc:109:27: warning: '&&' within '||' [-Wlogical-op-parentheses]
        if (extendedTests &&
            ~~~~~~~~~~~~~~^~
sao.cc:109:27: note: place parentheses around the '&&' expression to silence this warning
        if (extendedTests &&
                          ^

shm version

Hi :)
I compiled Libde265 SHVC branch and tried to decode the bistreams with SHM version 4.0, 5.0, 6.0, and 12.0, but, the 4.0 and 5.0 bitstream decoded only the layer 0.
Is there any option for decoding the other layers?

Please recommend me the right version of SHM for my experiment.

I look forward to your response.
Thanks!
Regard,
Son

ss

The output of tools/yuv-distortion always returns 0 for the 3nd column. The PSNR values are exactly the same as I get using other tools.

$ ./yuv-distortion F1.yuv F2.yuv 1920 1072
0 26.194000 0.000000ng frame 1
1 25.950652 0.000000ng frame 2
2 25.734250 0.000000ng frame 3
3 26.296376 0.000000ng frame 4
4 26.298215 0.000000ng frame 5
5 26.324584 0.000000ng frame 6
6 26.671997 0.000000ng frame 7
7 26.365405 0.000000ng frame 8
8 26.250325 0.000000ng frame 9
9 26.915763 0.000000ng frame 10
10 26.747261 0.000000ng frame 11
...

Using commit: 503af19

user data retrieval

Please recommend:
When user data is pushed with each NAL (incl. parameter sets), how can it ever be retrieved if it is only accessible via the image structure? Should a separate list be kept to sort out stale entries?

Problem with moc-qt4 on OS X

Hi,

Just trying to build on OS X and running into this issue when building:
mv -f .deps/sherlock265-VideoWidget.Tpo .deps/sherlock265-VideoWidget.Po
/usr/bin/moc-qt4 VideoPlayer.hh -o moc_VideoPlayer.cpp
make[2]: /usr/bin/moc-qt4: No such file or directory
make[2]: *** [moc_VideoPlayer.cpp] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I installed qt developer tools using brew so it is possible something may have been missed but I can't find any reference to where /usr/bin/moc-qt4 would come from

Check type selection for sizes

I guess that a few functions will not work correctly if they will get negative values.
How do you think about to replace any "int" parameter like "length" by the data type "size_t"?

Runtime CPU feature detection

We should always include the SSE optimized code (if the compiler supports it) and use runtime feature detection through CPUID to see if the CPU currently being used supports the required SSE level.

dump header info

hi,

i use -d option to dump headers while decoding a stream with multiple tiles and one slice per frame...but when i see the info, i see multiple slices, even if i decode one frame (using option -f 1) ....for example i decode one frame with one slice and 4 tiles....shouldn't i see 1 slice and 3 entry points? Instead there seem to be 4 slices info with respective entry points

Where to modify in order to let the configuration be able to find QT?

Hi:

It seems there shouldn't be any reason to "not able to find QT". Check the following command line output.

➜ libde265 git:(master) ✗ ./configure
...
checking for QT... no
configure: error: Package requirements (QtCore QtGui) were not met:

No package 'QtCore' found
No package 'QtGui' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables QT_CFLAGS
and QT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
➜ libde265 git:(master) ✗ echo $QT_LIBS
/opt/Qt5.3.0/5.3/gcc_64/lib
➜ libde265 git:(master) ✗ echo $PKG_CONFIG_PATH
/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/Qt5.3.0/5.3/gcc_64/lib/pkgconfig:/usr/local/cuda/pkgconfig
➜ libde265 git:(master) ✗ ls /opt/Qt5.3.0/5.3/gcc_64/lib/pkgconfig
Enginio.pc Qt5DesignerComponents.pc Qt5Nfc.pc Qt5QuickParticles.pc Qt5Sql.pc Qt5X11Extras.pc
Qt5Bluetooth.pc Qt5Designer.pc Qt5OpenGLExtensions.pc Qt5Quick.pc Qt5Svg.pc Qt5XmlPatterns.pc
Qt5Bootstrap.pc Qt5Gui.pc Qt5OpenGL.pc Qt5QuickTest.pc Qt5Test.pc Qt5Xml.pc
Qt5CLucene.pc Qt5Help.pc Qt5PlatformSupport.pc Qt5QuickWidgets.pc Qt5UiTools.pc
Qt5Concurrent.pc Qt5Multimedia.pc Qt5Positioning.pc Qt5Script.pc Qt5WebKit.pc
Qt5Core.pc Qt5MultimediaQuick_p.pc Qt5PrintSupport.pc Qt5ScriptTools.pc Qt5WebKitWidgets.pc
Qt5DBus.pc Qt5MultimediaWidgets.pc Qt5QmlDevTools.pc Qt5Sensors.pc Qt5WebSockets.pc
Qt5Declarative.pc Qt5Network.pc Qt5Qml.pc Qt5SerialPort.pc Qt5Widgets.pc

I installed QT5.3.0 under /opt, instead of a standard directory. But, still, /opt/Qt5.3.0/5.3/gcc_64/lib/pkgconfig is included in $PKG_CONFIG_PATH .

Please do help.

cheers
Pei

encode YUV420 buffer

I cannot create de265_image (to be used with en265_push_image). When calling en265_allocate_image it crashes (because a NULL parameter sent to alloc_image).

if (img->alloc_image(width,height,de265_chroma_420, NULL, <=====

and then, in alloc_image
assert(sps)

I don't know if this is a bug, or I just to know how to use it. An example encoding a yuv frame from memory would be nice.

Missing iOS Build Script & Code Example

Sorry for posting an issue for my request. I study and learn libde265, specially the transferred emscription version that runs with the help of javascript. I would like to compare the speed of the libde265 javascript vs. a ARM Cortex CPU on my iPad. I have seen that you have published an App in the App Store, but i can't find the source for this app or any simple example how i can compile the libde265 and display decoded HEVC frames in an UIView under iOS.

Can you please help me our with some instructions or example?

Thanks a lot.

Gary

Problems Building on Visual Studio 2013

First off, something odd was happening when std::min and std::max were used. A #define appeared to be set for min and max, replacing them with nothing, but I was able to fix those errors by adding #undef min and #undef max at the start of the code in the relevant files.

Next, linker errors:

Error   18  error LNK2019: unresolved external symbol "public: bool __cdecl encoder_picture_buffer::have_more_frames_to_encode(void)const " (?have_more_frames_to_encode@encoder_picture_buffer@@QEBA_NXZ) referenced in function en265_encode  C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265
Error   19  error LNK2019: unresolved external symbol "public: void __cdecl encoder_picture_buffer::mark_image_is_outputted(int)" (?mark_image_is_outputted@encoder_picture_buffer@@QEAAXH@Z) referenced in function en265_free_packet  C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265
Error   20  error LNK2019: unresolved external symbol "public: void __cdecl encoder_picture_buffer::release_input_image(int)" (?release_input_image@encoder_picture_buffer@@QEAAXH@Z) referenced in function en265_free_packet  C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265
Error   21  error LNK2019: unresolved external symbol "public: __cdecl encoder_context::encoder_context(void)" (??0encoder_context@@QEAA@XZ) referenced in function en265_new_encoder   C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265
Error   22  error LNK2019: unresolved external symbol "public: void __cdecl encoder_context::start_encoder(void)" (?start_encoder@encoder_context@@QEAAXXZ) referenced in function en265_start_encoder  C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265
Error   23  error LNK2019: unresolved external symbol "public: enum de265_error __cdecl encoder_context::encode_picture_from_input_buffer(void)" (?encode_picture_from_input_buffer@encoder_context@@QEAA?AW4de265_error@@XZ) referenced in function en265_encode   C:\Users\____\Documents\GitHub\libde265\build\vc9-x86\en265.obj dec265

sub-layer non-reference picture in process_picture_order_count

“Sub-layer non-reference picture” case in

  if (1 /* TemporalID==0 */ && // TODO
      (isReferenceNALU(ctx->nal_unit_type) &&
       (!isRASL(ctx->nal_unit_type) && !isRADL(ctx->nal_unit_type))) &&
      1 /* sub-layer non-reference picture */) // TODO

is actually managed by isReferenceNALU(ctx->nal_unit_type). See 7.4.2.2 of ITU-T H.265:

If a picture has nal_unit_type equal to TRAIL_N, TSA_N, STSA_N, RADL_N, RASL_N, RSV_VCL_N10, RSV_VCL_N12, or RSV_VCL_N14, the picture is a sub-layer non-reference picture. Otherwise, the picture is a sublayer reference picture.

So you can remove && 1 /* sub-layer non-reference picture */ along with the last TODO.

stripes in deblocking

what is the purpose of several 'stripes' per thread when parallelizing the deblock filter? i tried to use different number of stripes but always any number bigger than number of threads delays the decoding time...is it destined for non-x86 environments?

undeclared identifier NULL on FreeBSD

The following error happens when trying to build libde265 1.0.2 on FreeBSD.

The newer FreeBSD releases use Clang as the default compiler, which give the error below. I have tested a old FreeBSD that still has GCC as default compiler build this code fine without any changes.

Disabling the #define in libde265/util.h fixes the build but I'm not sure that it is the right thing to do.

/bin/sh ../../../libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I../../.. -I../.. -pipe -g -fstack-protector -fno-strict-aliasing -Werror=return-type -Werror=unused-result -Werror=reorder -std=gnu++11 -DDE265_LOG_ERROR -MT libde265_encoder_algo_la-algo.lo -MD -MP -MF .deps/libde265_encoder_algo_la-algo.Tpo -c -o libde265_encoder_algo_la-algo.lo test -f 'algo.cc' || echo './'algo.cc
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../../.. -I../.. -pipe -g -fstack-protector -fno-strict-aliasing -Werror=return-type -Werror=unused-result -Werror=reorder -std=gnu++11 -DDE265_LOG_ERROR -MT libde265_encoder_algo_la-algo.lo -MD -MP -MF .deps/libde265_encoder_algo_la-algo.Tpo -c algo.cc -fPIC -DPIC -o .libs/libde265_encoder_algo_la-algo.o
In file included from algo.cc:23:
In file included from ../../../libde265/encoder/algo/algo.h:26:
In file included from ../../../libde265/encoder/encode.h:26:
../../../libde265/image.h:86:26: error: use of undeclared identifier 'NULL'
MetaDataArray() { data=NULL; data_size=0; log2unitSize=0; width_in_uni...
^
/usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL'

define NULL nullptr

            ^

../../../libde265/util.h:75:17: note: expanded from macro 'nullptr'

define nullptr NULL

            ^

decoding decode_coeff_abs_level_remaining syntax element

Hi,

Something seems to be wrong in decoding of decode_coeff_abs_level_remaining sytax element. The code is

static int decode_coeff_abs_level_remaining(thread_context* tctx,
                           int param)
{
  logtrace(LogSlice,"# decode_coeff_abs_level_remaining\n");

  int prefix=0;
  int codeword=0;
  do {
    prefix++;
    codeword = decode_CABAC_bypass(&tctx->cabac_decoder);
  }
  while (codeword);
  codeword = 1-codeword;
  prefix -= codeword;
  codeword=0;

  int value;

  if (prefix < /* COEF_REMAIN_BIN_REDUCTION */ 3) {
    codeword = decode_CABAC_FL_bypass(&tctx->cabac_decoder, param);
    value = (prefix<<param) + codeword;
  }
  else {
    codeword = decode_CABAC_FL_bypass(&tctx->cabac_decoder, prefix-3+param);
    value = (((1<<(prefix-3))+3-1)<<param)+codeword;
  }

  return value;
}

I understand that the prefix is calculating TR prefix value, which can be maximum of 4. The if statement tries to figure out if what is left is TR suffix or suffix val coded using EGk. The TR suffix part (if part) seems to be ok. But the EGk part (else part) seems to be wrong. Here it is decoding prefix-3+param bits which is nothing but param+1 bits(because prefix here can only be 4). Shouldn't it be calling decode_CABAC_EGk_bypass instead?

Support for Raspian Jessie

Trying to install on Raspian Rasbperry Pi3 and giving me an error could not find a distribution template for Raspian

Lots of valgrind errors about "Conditional jump or move depends on uninitialised value(s)"

Seen on my machine when running with valgrind 3.7.0 as

valgrind --tool=memcheck --quiet --error-exitcode=1 ./dec265/dec265 -t 4 -q -c -f 100 ../libde265-data/RandomAccess/paris-ra-wpp.bin

This reports lots of messages about Conditional jump or move depends on uninitialised value(s) like the following (and various others):

==23536== Conditional jump or move depends on uninitialised value(s)
==23536==    at 0x5131772: void transform_idct_add<unsigned char>(unsigned char*, long, int, short const*, int) (fallback-dct.cc:686)
==23536==    by 0x5111CD5: void scale_coefficients_internal<unsigned char>(thread_context*, int, int, int, int, int, int, bool, bool, int) (acceleration.h:353)
==23536==    by 0x5115D73: decode_TU(thread_context*, int, int, int, int, int, int, PredMode, bool) (slice.cc:3472)
==23536==    by 0x5119ECE: read_transform_unit(thread_context*, int, int, int, int, int, int, int, int, int, int, int, int) (slice.cc:3649)
==23536==    by 0x511AC73: read_transform_tree(thread_context*, int, int, int, int, int, int, int, int, int, int, int, PredMode, unsigned char, unsigned char) (slice.cc:3925)
==23536==    by 0x511BE62: read_coding_unit(thread_context*, int, int, int, int) (slice.cc:4558)
==23536==    by 0x511D074: read_coding_quadtree(thread_context*, int, int, int, int) (slice.cc:4618)
==23536==    by 0x511D044: read_coding_quadtree(thread_context*, int, int, int, int) (slice.cc:4621)
==23536==    by 0x511D4E1: decode_substream(thread_context*, bool, bool) (slice.cc:4721)
==23536==    by 0x511DA1A: thread_task_ctb_row::work() (slice.cc:4971)
==23536==    by 0x512AAEC: worker_thread(void*) (threads.cc:231)
==23536==    by 0x6F1DE99: start_thread (pthread_create.c:308)
==23536== 
==23536== Conditional jump or move depends on uninitialised value(s)
==23536==    at 0x50FBD03: void edge_filtering_luma_internal<unsigned char>(de265_image*, bool, int, int, int, int) (deblock.cc:527)
==23536==    by 0x50FA6BA: thread_task_deblock_CTBRow::work() (deblock.cc:970)
==23536==    by 0x512AAEC: worker_thread(void*) (threads.cc:231)
==23536==    by 0x6F1DE99: start_thread (pthread_create.c:308)
==23536==    by 0x580138C: clone (clone.S:112)

I understand that this doesn't cause the decoding to fail, but depending on uninitialised values seems wrong to me.

Cross-Compiling for Android

Hi all,

I followed this tutorial and built libde265.so, however failed to "integrate" with android: arm-linux-androideabi-strip says "File format not recognized" when trying to include libde265.so as PREBUILT_SHARED_LIBRARY. After some research and experiments I noticed that file libde265.so prints following:
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

But if I Compile single C source file with arm-linux-androideabi-gcc (found in NDK toolchains), file prints:
ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

My guess is that configure.sh does not recognize CC environment variable.

Any ideas?

Segfault after resetting codec

When decoding libde265-data/RandomAccess/paris-ra-wpp.bin using dec265 with a single thread and resetting the codec after the first chunk has been decoded, the decoder crashes with a segfault in sei.c:35because ctx->current_spsis NULL.

Changes to dec265.cc:

diff --git a/dec265/dec265.cc b/dec265/dec265.cc
index 1811102..c2f59ab 100644
--- a/dec265/dec265.cc
+++ b/dec265/dec265.cc
@@ -377,6 +377,9 @@ int main(int argc, char** argv)

   while (!stop)
     {
+      if (pos > 0) {
+        de265_reset(ctx);
+      }
       if (nal_input) {
         uint8_t len[4];
         int n = fread(len,1,4,fh);

Comand line was ./dec265/dec265 ../libde265-data/RandomAccess/paris-ra-wpp.bin -q

error when running encoder

Hi,

i successfully compiled the encoder code, but when i run it i got an error:

lt-enc265: image.cc:241: de265_error de265_image::alloc_image(int, int, de265_chroma, const seq_parameter_set_, bool, decoder_context_, encoder_context_, de265_
PTS, void_, bool): Assertion `sps' failed.
Aborted (core dumped)

comman used : ./enc265 -i akiyo_cif.yuv -w 352 -h 288 -o out.bin --sop-structure intra
the platform is ARM A15 Cortex and the OS ubuntu 13.10, however the platform is unlikely to be the reason?

BR,
George

hevc chrome app

hey where can i find the source of the hevc player chrome app for the nacl runtime ?

SHVC decoding option.

Hi :)
I am going to ask a question about something that is important for what I am going to do.
I’ve tried to build libde265(master branch) and I just compile it successfully.

However, I don't know what is the SHVC decoding option.
It only decodes layer0. I wnat to decode the other layers.

I look forward to your responses.
Thanks!

how to open X11 for sherlock265

I try to compile libde265 with SDL, QT and libvideogfx, in order to get the GUI video player - sherlock265. The environment is under win7 64bits with Cygwin. And SDL, QT and libvideogfx libraries are all ok in the process of 'configure'. But, when in compilation ('make'), it fails with the error in dec265.cc, 'static X11Win win;'. It seems that the compiler is not able to figure out the type name 'X11Win'.

Solution: it is actually very simple. When configuring libvideogfx, remember to add the parameter '--wth-x', which allowes libvideogfx to support x11.

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.