summaryrefslogtreecommitdiff
path: root/command/streaminfo.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2013-10-13 18:26:09 +0200
committerJochen Dolze <vdr@dolze.de>2013-10-13 18:26:09 +0200
commit5b1ab197ef7c82b6b95bd4c96ceac2443e81e2d7 (patch)
tree1876a381374ed10d788eb5a5987b9629cbd5fbfa /command/streaminfo.cpp
parentda9cda00be6d4c9c69cf7ff5506c867a38f42715 (diff)
downloadvdr-plugin-markad-5b1ab197ef7c82b6b95bd4c96ceac2443e81e2d7.tar.gz
vdr-plugin-markad-5b1ab197ef7c82b6b95bd4c96ceac2443e81e2d7.tar.bz2
Reverted changes in streaminfo.cpp from 2012-09-29 (should fix #1108)
Increased intensity value from 100 to 180 Increased HD buffer
Diffstat (limited to 'command/streaminfo.cpp')
-rw-r--r--command/streaminfo.cpp77
1 files changed, 39 insertions, 38 deletions
diff --git a/command/streaminfo.cpp b/command/streaminfo.cpp
index 8657bb2..6defb45 100644
--- a/command/streaminfo.cpp
+++ b/command/streaminfo.cpp
@@ -121,7 +121,7 @@ bool cMarkAdStreamInfo::FindVideoInfos(MarkAdContext *maContext, uchar *pkt, int
}
return false;
}
-#include <stdio.h>
+
bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt, int len)
{
if ((!maContext) || (!pkt) || (!len)) return false;
@@ -139,55 +139,56 @@ bool cMarkAdStreamInfo::FindH264VideoInfos(MarkAdContext *maContext, uchar *pkt,
}
else
{
- if (maContext->Video.Info.Interlaced)
- {
- if (H264.use_field) {
- H264.use_field=false;
- return true;
- } else {
- H264.use_field=true;
- }
- } else {
- return true;
- }
-
/*
- if (maContext->Video.Info.Interlaced) {
- if (H264.use_field) return true;
+ if (maContext->Video.Info.Interlaced)
+ {
+ if (H264.use_field) {
+ H264.use_field=false;
+ return true;
+ } else {
+ H264.use_field=true;
+ }
} else {
return true;
}
*/
+
+ if (maContext->Video.Info.Interlaced) {
+ if (H264.use_field) return true;
+ } else {
+ return true;
+ }
+
}
}
- /*
- if ((nalu==NAL_SLICE) || (nalu==NAL_IDR_SLICE))
+
+ if ((nalu==NAL_SLICE) || (nalu==NAL_IDR_SLICE))
+ {
+ uint8_t *nal_data=(uint8_t*) alloca(len);
+ if (!nal_data) return false;
+ int nal_len = nalUnescape(nal_data, pkt + 5, len - 5);
+ cBitStream bs(nal_data, nal_len);
+
+ bs.skipUeGolomb(); // first_mb_in_slice
+ bs.skipUeGolomb(); // slice_type
+ bs.skipUeGolomb(); // pic_parameter_set_id
+ if (H264.separate_colour_plane_flag)
{
- uint8_t *nal_data=(uint8_t*) alloca(len);
- if (!nal_data) return false;
- int nal_len = nalUnescape(nal_data, pkt + 5, len - 5);
- cBitStream bs(nal_data, nal_len);
-
- bs.skipUeGolomb(); // first_mb_in_slice
- bs.skipUeGolomb(); // slice_type
- bs.skipUeGolomb(); // pic_parameter_set_id
- if (H264.separate_colour_plane_flag)
- {
- bs.skipBits(2); // colour_plane_id
- }
- bs.skipBits(H264.log2_max_frame_num); // frame_num
+ bs.skipBits(2); // colour_plane_id
+ }
+ bs.skipBits(H264.log2_max_frame_num); // frame_num
- if (maContext->Video.Info.Interlaced)
+ if (maContext->Video.Info.Interlaced)
+ {
+ if (bs.getBit()) // field_pic_flag
{
- if (bs.getBit()) // field_pic_flag
- {
- H264.use_field=bs.getBit(); // bottom_field_flag
- } else {
- H264.use_field=true;
- }
+ H264.use_field=bs.getBit(); // bottom_field_flag
+ } else {
+ H264.use_field=true;
}
}
- */
+ }
+
if (nalu==NAL_SPS)
{
uint8_t *nal_data=(uint8_t*) alloca(len);