Skip to content

Commit

Permalink
V0-3-0: Adding ffmpeg-powered H264 decoder (#8)
Browse files Browse the repository at this point in the history
* Remove old debugging code
* Remove hardcoded binary location
* Fix video stack order
* Fix namespace error
* Update vidlib.hpp
* Refactor makefile
* Add libraries
* more library changes
* New ffmpeg library
* Update vidlib.hpp
  • Loading branch information
GeekLogan authored Dec 3, 2024
1 parent 791a81e commit dea1ad5
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 51 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG BUILD_THREAD=5

RUN apt update
RUN apt install -y build-essential libboost-all-dev libsqlite3-dev libasio-dev nasm
RUN apt install -y ffmpeg libswscale-dev libavutil-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswresample-dev

WORKDIR /app

Expand All @@ -13,7 +14,7 @@ COPY . .
RUN cd x264; make -j $BUILD_THREAD; cd ..
RUN cd zstd; make -j $BUILD_THREAD; cd ..

RUN make
RUN make all

EXPOSE ${CDN_PORT}

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
app:
g++ -std=c++17 -O3 -march=native src/app.cpp ./zstd/lib/libzstd.so ./x264/libx264.a -lpthread -lsqlite3 -o nTracer_cdn -Wl,--no-as-needed -ldl
CXXFILES = src/app.cpp
INCLIBS = ./zstd/lib/libzstd.so ./x264/libx264.a
LIBS = -lpthread -lsqlite3 -lavcodec -lavformat -lavutil -lswscale
CXXFLAGS = -O3 -std=c++17 -march=native -o nTracer_cdn -Wl,--no-as-needed -ldl

all:
$(CXX) $(CXXFILES) $(INCLIBS) $(LIBS) $(CXXFLAGS)
2 changes: 1 addition & 1 deletion src/reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class packed_reader

case 2:
// Decompress with vidlib
read_decomp_buffer_pt = decode_stack(chunkx, chunky, chunkz, read_buffer, sel->size);
read_decomp_buffer_pt = decode_stack_2(chunkx, chunky, chunkz, read_buffer, sel->size);
read_decomp_buffer = (char *)pixtype_to_uint16(read_decomp_buffer_pt, chunkx * chunky * chunkz);
free(read_decomp_buffer_pt);
break;
Expand Down
Loading

0 comments on commit dea1ad5

Please sign in to comment.